|
(SCEA) Sun Certified Enterprise Architect for J2EE Technology (CX-310-051) Tutorial |
|
|
|
Contributed by Joe
|
|
Thursday, 22 June 2006 |
|
Page 5 of 5 Exam Objectives Product Description Sun Certified Enterprise Architect for J2EE Technology (SCEA 310-051) Given: 1. public class WhileFoo { 2. public static void main(String[] args) { 3. int x = 1,y = 6; 4. while (y--) {x++;) 5. System.out.println("x="+x+"y="xy); 6. } 7. } What is the result? A. The output is x = 6 y = 0. B. The output is x = 7 y = 0. C. The output is x = 6 y = -1. D. The output is x = 7 y = -1. E. Compilation fail.
Given: 1. public class Foo { 2. public static void main(String[] args) { 3. String s; 4. System 5. } 6. } What is the result? A. The code compiles and "s=" is printed. B. The code compiles and "s=null" is printed. C. The code does not compile because String s is not initialized. D. The code does not compile because String s cannot be referenced.
|
|
Last Updated ( Friday, 07 July 2006 )
|