(SCEA) Sun Certified Enterprise Architect for J2EE Technology (CX-310-051) Tutorial: Page 5

Home arrow Java Tutorials arrow SCEA 310-051 arrow (SCEA) Sun Certified Enterprise Architect for J2EE Technology (CX-310-051) Tutorial
(SCEA) Sun Certified Enterprise Architect for J2EE Technology (CX-310-051) Tutorial Print E-mail
Contributed by Joe   
Thursday, 22 June 2006

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 )

  home              contact us

 

©2006-2009 DeveloperZone.biz   All rights reserved     powered by Mambo Designed by Siteground