Exam 2: Java Fundamentals
Exam 1: Introduction to Computers and Java53 Questions
Exam 2: Java Fundamentals52 Questions
Exam 3: Decision Structures58 Questions
Exam 4: Loops and Files56 Questions
Exam 5: Methods56 Questions
Exam 6: A First Look at Classes58 Questions
Exam 7: Arrays and the Arraylist Class63 Questions
Exam 8: A Second Look at Classes and Objects52 Questions
Exam 9: Text Processing and More About Wrapper Classes62 Questions
Exam 10: Inheritance64 Questions
Exam 11: Exceptions and Advanced File Io59 Questions
Exam 12: Java-Fx: Gui Programming and Basic Controls42 Questions
Exam 13: Java-Fx: Advanced Controls40 Questions
Exam 14: Java-Fx: Graphics, Effects, and Media40 Questions
Exam 15: Recursion23 Questions
Exam 16: Databases40 Questions
Select questions type
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
(32)
Both character and string literals can be assigned to a char variable.
(True/False)
5.0/5
(42)
Which of the following cannot be used as identifiers in Java?
(Multiple Choice)
4.9/5
(44)
A Java program will not compile unless it contains the correct line numbers.
(True/False)
4.8/5
(50)
The System.out.printf method allows you to format output in a variety of ways.
(True/False)
4.8/5
(36)
What is the result of the following expression?
17 % 3 * 2 - 12 + 15
(Multiple Choice)
4.8/5
(40)
What would be printed out as a result of the following code? System.out.println("The quick brown fox" +
"jumped over the \n"
"slow moving hen.");
(Multiple Choice)
4.8/5
(33)
The primitive data types only allow a(n) __________ to hold a single value.
(Multiple Choice)
4.9/5
(40)
The boolean data type may contain which of 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.8/5
(35)
Which of the following statements correctly creates a Scanner object for keyboard input?
(Multiple Choice)
4.8/5
(27)
The Java API provides a class named Math that contains numerous methods which are useful for performing complex mathematical operations.
(True/False)
4.8/5
(40)
When the + operator is used with strings, it is known as the
(Multiple Choice)
4.8/5
(37)
Which of the following is not a rule that must be followed when naming identifiers?
(Multiple Choice)
4.8/5
(37)
What is the value of z after the following code is executed?
int x = 5, y = 28;
Float z;
Z = (float) (y / x);
(Multiple Choice)
4.8/5
(45)
If x has been declared an int, which of the following statements is invalid?
(Multiple Choice)
4.9/5
(38)
What will be displayed as a result of executing the following code?
public class test
{
Public static void main(String[ ] args)
{
Int value1 = 9;
System.out.println(value1);
Int value2 = 45;
System.out.println(value2);
System.out.println(value3);
Value = 16;
}
}
(Multiple Choice)
4.8/5
(34)
Character literals are enclosed in __________ and string literals are enclosed in __________.
(Multiple Choice)
4.8/5
(31)
Showing 21 - 40 of 52
Filters
- Essay(0)
- Multiple Choice(0)
- Short Answer(0)
- True False(0)
- Matching(0)