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
The primitive data types only allow a(n) ________ to hold a single value.
(Multiple Choice)
4.9/5
(34)
What will be the value of z as a result of executing the following code?
Int x = 5, y = 28;
Float z;
Z = (float) (y / x);
(Multiple Choice)
4.9/5
(36)
A message dialog is a quick and simple way to ask the user to enter data.
(True/False)
4.9/5
(41)
The simplest way you can use the System.out.printf method is
(Multiple Choice)
4.9/5
(44)
A variable's scope is the part of the program that has access to the variable.
(True/False)
4.8/5
(41)
What will be the value of z after the following statements have been executed?
int x = 4, y = 33;
Double z;
Z = (double) (y / x);
(Multiple Choice)
4.7/5
(42)
The System.out.printf method allows you to format output in a variety of ways.
(True/False)
4.7/5
(30)
To print "Hello, world" on the monitor, use the following Java statement:
(Multiple Choice)
4.9/5
(36)
If you wish to use the System.out.printf method to print a string argument, use the ________ format specifier.
(Multiple Choice)
4.8/5
(43)
What is the result of the following expression?
10 + 5 * 3 - 20
(Multiple Choice)
4.7/5
(36)
In the following Java statement what value is stored in the variable name? String name = "John Doe";
(Multiple Choice)
4.8/5
(30)
What would be displayed as a result of the following code?
int x = 578; System.out.print("There are " +
X + 5 + "\n" +
"hens in the hen house.");
(Multiple Choice)
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
(43)
If you use a flag in a format specifier, you must write the flag before the field width and the precision.
(True/False)
4.9/5
(40)
This is a value that is written into the code of a program.
(Multiple Choice)
4.9/5
(41)
This statement tells the compiler where to find the JOptionPane class and makes it available to your program.
(Multiple Choice)
4.8/5
(37)
Showing 21 - 40 of 40
Filters
- Essay(0)
- Multiple Choice(0)
- Short Answer(0)
- True False(0)
- Matching(0)