Exam 2: Java Fundamentals
Exam 1: Introduction to Computers and Java40 Questions
Exam 2: Java Fundamentals40 Questions
Exam 3: A First Look at Classes and Objects40 Questions
Exam 4: Decision Structures42 Questions
Exam 5: Loops and Files40 Questions
Exam 6: A Second Look at Classes and Objects40 Questions
Exam 7: Arrays and the Arraylist Class40 Questions
Exam 8: Text Processing and Wrapper Classes40 Questions
Exam 9: Inheritance40 Questions
Exam 10: Exceptions and Advanced File Io40 Questions
Exam 11: Java-Fx: Gui Programming and Basic Controls40 Questions
Exam 12: Java-Fx: Advanced Controls40 Questions
Exam 13: Java-Fx: Graphics, Effects, and Media40 Questions
Exam 14: Recursion24 Questions
Exam 15: Databases40 Questions
Select questions type
What would be displayed as a result of executing the following code?
int x = 578;
System.out.print("There are " +
X + 5 + "\n" +
"hens in the hen house.");
Free
(Multiple Choice)
4.9/5
(35)
Correct Answer:
B
Character literals are enclosed in __________ and string literals are enclosed in __________.
Free
(Multiple Choice)
4.8/5
(36)
Correct Answer:
A
The Java API provides a class named Math that contains numerous methods which are useful for performing complex mathematical operations.
Free
(True/False)
4.9/5
(29)
Correct Answer:
True
What is the result of the following expression?
17 % 3 * 2 - 12 + 15
(Multiple Choice)
4.9/5
(37)
Named constants are initialized with a value and that value cannot change during the execution of the program.
(True/False)
4.8/5
(39)
Which of the following statements will correctly convert the data type, if x is a float and y is a double?
(Multiple Choice)
4.7/5
(43)
The primitive data types only allow a(n) __________ to hold a single value.
(Multiple Choice)
4.7/5
(40)
What would be displayed as a result of executing the following code?
final int x = 22, y = 4;
Y += x;
System.out.println("x = " + x + ", y = " + y)
(Multiple Choice)
4.8/5
(38)
In the following Java statement, what value is stored in the variable name?
String name = "John Doe";
(Multiple Choice)
4.9/5
(39)
Unlike a console program, a program that uses the JOptionPane does not automatically stop executing when the end of the main method is reached.
(True/False)
4.7/5
(43)
When you call one of the Scanner class's methods to read a primitive value, such as nextInt or nextDouble , and then call the nextLine method to read a string, an annoying and hard-to-find problem can occur.
(True/False)
4.9/5
(33)
What output will be displayed as a result of executing the following code?
int x = 5, y = 20;
X += 32;
Y /= 4;
System.out.println("x = " + x + ", y = " + y);
(Multiple Choice)
4.8/5
(23)
What is the result of the following expression?
10 + 5 * 3 - 20
(Multiple Choice)
4.7/5
(36)
The System.out.printf method allows you to format output in a variety of ways.
(True/False)
4.7/5
(47)
Showing 1 - 20 of 40
Filters
- Essay(0)
- Multiple Choice(0)
- Short Answer(0)
- True False(0)
- Matching(0)