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 is the result of the following expression?
10 + 5 * 3 - 20
Free
(Multiple Choice)
4.8/5
(35)
Correct Answer:
C
Which of the following is not a rule that must be followed when naming identifiers?
Free
(Multiple Choice)
4.9/5
(29)
Correct Answer:
B
A Java program must have at least one of the following:
Free
(Multiple Choice)
4.9/5
(35)
Correct Answer:
B
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
(33)
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
(31)
Programming style includes techniques for consistently putting spaces and indentation in a program to help create visual cues.
(True/False)
4.8/5
(40)
To display the output on the next line, you can use the println method or use the __________ escape sequence in the print method.
(Multiple Choice)
4.8/5
(31)
Which of the following would contain the translated Java byte code for a program named Demo?
(Multiple Choice)
4.7/5
(28)
Which of the following is a value that is written into the code of a program?
(Multiple Choice)
4.7/5
(43)
In the following Java statement, what value is stored in the variable name? String name = "John Doe";
(Multiple Choice)
4.8/5
(31)
If the compiler encounters a statement that uses a variable before the variable is declared, an error will result.
(True/False)
4.9/5
(29)
What will be displayed as a result of executing the following code? int x = 6;
String msg = "I am enjoying this class.";
String msg1 = msg.toUpperCase();
String msg2 = msg.toLowerCase();
Char ltr = msg.charAt(x);
Int strSize = msg.length();
System.out.println(msg);
System.out.println(msg1);
System.out.println(msg2);
System.out.println("Character at index x = " + ltr);
System.out.println("msg has " + strSize + "characters.");
(Multiple Choice)
4.9/5
(26)
What is 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.9/5
(34)
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.");
(Multiple Choice)
4.9/5
(37)
Showing 1 - 20 of 52
Filters
- Essay(0)
- Multiple Choice(0)
- Short Answer(0)
- True False(0)
- Matching(0)