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 Structures40 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 I/O40 Questions
Exam 11: GUI Applications–Part 140 Questions
Exam 12: GUI Applications–Part 240 Questions
Exam 13: Applets and More40 Questions
Exam 14: Creating GUI Applications with JavaFX40 Questions
Exam 15: Recursion20 Questions
Exam 16: Databases40 Questions
Select questions type
A(n) ________ is a dialog box that prompts the user for input.
Free
(Multiple Choice)
4.9/5
(37)
Correct Answer:
D
Which of the following is not a rule that must be followed when naming identifiers?
Free
(Multiple Choice)
4.8/5
(36)
Correct Answer:
B
What is the result of the following expression?
17 % 3 * 2 - 12 + 15
Free
(Multiple Choice)
4.7/5
(41)
Correct Answer:
C
The Java API provides a class named Math, which contains numerous methods that are useful for performing complex mathematical operations.
(True/False)
4.8/5
(39)
The boolean data type may contain the following range of values:
(Multiple Choice)
4.9/5
(35)
Named constants are initialized with a value, and that value cannot change during the execution of the program.
(True/False)
4.9/5
(39)
Unlike a console program, a program that uses JOptionPane does not automatically stop executing when the end of the main method is reached.
(True/False)
4.9/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.9/5
(41)
Which of the following statements correctly creates a Scanner object for keyboard input?
(Multiple Choice)
4.9/5
(31)
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.7/5
(42)
Both character literals and string literals can be assigned to a char variable.
(True/False)
4.8/5
(40)
When saving a Java source file, save it with an extension of
(Multiple Choice)
5.0/5
(35)
Programming style includes techniques for consistently putting spaces and indentation in a program so visual cues are created.
(True/False)
4.9/5
(36)
Character literals are enclosed in ________, and string literals are enclosed in ________.
(Multiple Choice)
4.8/5
(34)
What will be the displayed when the following code is executed?
Final int x = 22, y = 4;
Y += x;
System.out.println("x = " + x + ", y = " + y);
(Multiple Choice)
4.8/5
(27)
What will be displayed after the following statements have been executed?
Int x = 15, y = 20, z = 32;
X += 12;
Y /= 6;
Z -= 14;
System.out.println("x = " + x +
", y = " + y +
", z = " + z);
(Multiple Choice)
4.9/5
(42)
Showing 1 - 20 of 40
Filters
- Essay(0)
- Multiple Choice(0)
- Short Answer(0)
- True False(0)
- Matching(0)