Professional Documents
Culture Documents
Su Informe
Correcta
Q1) Given
Correcta
Correcta
Q4) Given
Correcta
Q5) Which two will compile, and can be run successfully using the following
command? java Fred1 hello walls
A. class Fred 1{ public static void main(String args) { System.out.println(args[1]); } }
B. abstract class Fred1 { public static void main(String[] args) { System.out.println(args[2]); } }
C. class Fred1 { public static void main(String[] args) { System.out.println(args); } } (Su
Respuesta)(Correcta)
D. class Fred1 { public static void main(String[] args) { System.out.println(args[1]); } }
Incorrecta
Q6) Given:
Correcta
Q7) Given
What is the result?
A. 6564 (Su Respuesta)(Correcta)
B. 6554
C. 6566
D. 6565
Correcta
Q8) Given:
Correcta
Q9) Given
What is the result?
A. 22 (Su Respuesta)(Correcta)
B. 12
C. 32
D. 33
Incorrecta
Q10) Given:
Incorrecta
Q11) Given:
What is the result if you try to compile Truthy.java and then run it with assertions
enabled?
A. Truthy.java does NOT compile. (Correcta)
B. Truthy.java compiles and the output is x != 6.
C. Truthy.java compiles and an AssertionError is thrown with no additional output.
D. Truthy.java compiles and an AssertionError is thrown with x != 6 as additional output. (Su
Respuesta)(Incorrecta)
Correcta
Correcta
Q13) Given:
Correcta
Incorrecta
Q15) Given
Correcta
Correcta
Q17) Given
What is the result?
A. sc: class.Object asc: class.AnotherSampleClass
B. sc: class.SampleClass asc: class.AnotherSampleClass
C. sc: class.AnotherSampleClass asc: class.SampleClass
D. sc: class.AnotherSampleClass asc: class.AnotherSampleClass (Su Respuesta)(Correcta)
Incorrecta
Q18) Given:
Incorrecta
Q19) Given:
What is the result?
A. 16 mph, lope.
B. 24 mph, lope.
C. 27 mph, lope. (Su Respuesta)(Incorrecta)
D. Compilation fails. (Correcta)
Correcta
Q20) Given:
Correcta
Q21) Which two may precede the word "class" in a class declaration?
A. Local.
B. Public. (Su Respuesta)(Correcta)
C. Static. (Su Respuesta)(Correcta)
D. Volatile.
E. Synchronized.
Correcta
Q22) Given:
Correcta
Q23) Given
Correcta
Q24) Given:
Correcta
Q25) Given