lunes, 8 de marzo de 2010

Examen Sun 310-056

Sun Certified Programmer for J2SE 5.0 es la versión actualizada

1.Given:
12. public class Wow {
13. public static void go(short n) {System.out.println("short");}
14. public static void go(Short n) {System.out.println("SHORT");}
15. public static void go(Long n)
{System.out.println(" LONG");}
16. public static void main(String [] args) {
17. Short y = 6;
18. int z= 7;
19. go(y);
20. go(z);
21. }
22. } What is the result?
A.short LONG
B.SHORT LONG
C.Compilation fails.
D.An exception is thrown at runtime.
Correct:C

2.Given:
11. interface DeclareStuff {
12. public static final int EASY = 3;
13. void doStuff(int t); }
14. public class TestDeclare implements DeclareStuff {
15. public static void main(String [] args) {
16.int x = 5;
17. new TestDeclare().doStuff(++x);
18. }
19. void doStuff(int s) {
20. s += EASY + ++s;
21.System.out.println("s " + s);
22. }
23. } What is the result?
A.s 14
B.s 16
C.s 10
D.Compilation fails.
E.An exception is thrown at runtime.
Correct:D

Más informaciones con preguntas interpertadas por pinturas ,y demo gratis (si necesita DEMO de PDF puede comunicarse con sales@killtest.es)en página http://www.killtest.es/SUNOtherCertifications/310-056.asp

No hay comentarios:

Publicar un comentario