A switch statement works with which wrapper class/reference type(s)
A. Character
Byte
C. Short
D. Int
查看答案
Which of the following statements will not compile
A. if(true);
B. if(true) {}
C. if(true) {;}
D. if(true) {;;}
E. if(true); {};
F. All statements will compile.
What type of statement is the following equation: y = (m*x)+b
A. Conditional statement
B. Assignment statement
C. Assertion statement
D. Transfer of control statement
Given x is declared with a valid integer, which conditional statement will not compile
A. if(x == 0) {System.out.println("True Statement");}
B. if(x == 0) {System.out.println("False Statement");}
C. if(x == 0) {;} elseif(x == 1){System.out.println("Valid Statement");}
D. if(x == 0); else if(x == 1){} else {;}
Which usage represents a valid way of compiling a Java class
A. java MainClass.class
B. javac MainClass
C. javac MainClass.source
D. javac MainClass.java