212-055 Dumps 212-055 Braindumps 212-055 Real Questions 212-055 Practice Test 212-055 Actual Questions SUN 212-055 Sun Certified Programmer for the Java 2 Platform.SE 5.0 https://killexams.com/pass4sure/exam-detail/212-055 16. } 17. } And the invocation: 31. test(null); What is the result? A. An exception is thrown at runtime. B. "String is empty" is printed to output. C. Compilation fails because of au error in line 12. D. "String is not empty" is printed to output. Answer: A QUESTION: 214 Given: 11. public static void test(String str) { 12. int check = 4; 13. if (check = str.length()) { 14. System.out.print(str.charAt(check -= 1) +", "); 15. } else { 16. System.out.print(str.charAt(0) + ", "); 17. } 18. } And the invocation: 21. test("four"); 22. test("tee"); 23. test("to"); What is the result? A. r, t, t, B. r, e, o, C. Compilation fails. D. An exception is thrown at runtime. Answer: C QUESTION: 215 135 Given: 10. public class MyClass { 11. 12. public Integer startingI; 13. public void methodA() { 14. Integer i = new Integer(25); 15. startingI = i; 16. methodB(i); 17. } 18. private void methodB(Integer i2) { 19. i2 = i2.intValue(); 20. 21. } 22. } If methodA is invoked, which two are true at line 20? (Choose two.) A. i2 == startingI returns true. B. i2 == startingI returns false. C. i2.equals(startingI) returns true. D. i2.equals(startingI) returns false. Answer: B, C QUESTION: 216 Given: 11. class Cup { } 12. class PoisonCup extends Cup { } .... 21. public void takeCup(Cup c) { 22. if(c instanceof PoisonCup) { 23. System.out.println("Inconceivable!"); 24. } else if(c instanceof Cup) { 25. System.out.println("Dizzying intellect! "); 26. } else { 27. System.exit(0); 28. } 29. } And the execution of the statements: Cup cup = new PoisonCup(); takeCup(cup); What is the output? 136 A. Inconceivable! B. Dizzying intellect! C. The code runs with no output. D. An exception is thrown at runtime. E. Compilation fails because of an error in line 22. Answer: A QUESTION: 217 Given: 11. String[] elements = { "for", "tea", "too" }; 12. String first = (elements.length > 0) ? elements[0] : null; What is the result? A. Compilation fails. B. An exception is thrown at runtime. C. The variable first is set to null. D. The variable first is set to elements[0]. Answer: D QUESTION: 218 Given: 42. public class ClassA { 43. public int getValue() { 44. int value=0; 45. boolean setting = true; 46. String title="Hello"; 47. if (value || (setting && title == "Hello")) { return 1; } 48. if (value == 1 & title.equals("Hello")) { return 2; } 49. } 50. } And: 70. ClassA a = new ClassA(); 71. a.getValue(); What is the result? 137 A. 1 B. 2 C. Compilation fails. D. The code runs with no output. E. An exception is thrown at runtime. Answer: C QUESTION: 219 Click the Exhibit button. What is the result? Exhibit: A. go in Goban go in Sente go in Sente B. go in Sente go in Sente go in Goban C. go in Sente go in Goban go in Goban 138 D. go in Goban go in Goban go in Sente E. Compilation fails because of an error in line 17. Answer: C QUESTION: 220 Given: 10. public class Foo { 11. public int a; 12. public Foo() { a = 3; } 13. public void addFive() { a += 5; } 14. } and: 20. public class Bar extends Foo { 21. public int a; 22. public Bar() { a = 8; } 23. public void addFive() { this.a +=5; } 24. } invoked with: 30. Foo foo = new Bar(); 31. foo.addFive(); 32. System.out.println("Value: "+ foo.a); What is the result? A. Value: 3 B. Value: 8 C. Value: 13 D. Compilation fails. E. The code runs with no output. F. An exception is thrown at runtime. Answer: A QUESTION: 221 Which of the following follows Correct Java Bean Listner rules: A. Listener() 139 B. addMouseListener() C. updateActionListener() D. removeMyListener() Answer: A, B, D 140 6$03/( 48(67,216 7KHVH TXHVWLRQV DUH IRU GHPR SXUSRVH RQO\ )XOO YHUVLRQ LV XS WR GDWH DQG FRQWDLQV DFWXDO TXHVWLRQV DQG DQVZHUV .LOOH[DPV FRP LV DQ RQOLQH SODWIRUP WKDW RIIHUV D ZLGH UDQJH RI VHUYLFHV UHODWHG WR FHUWLILFDWLRQ H[DP SUHSDUDWLRQ 7KH SODWIRUP SURYLGHV DFWXDO TXHVWLRQV H[DP GXPSV DQG SUDFWLFH WHVWV WR KHOS LQGLYLGXDOV SUHSDUH IRU YDULRXV FHUWLILFDWLRQ H[DPV ZLWK FRQILGHQFH +HUH DUH VRPH NH\ IHDWXUHV DQG VHUYLFHV RIIHUHG E\ .LOOH[DPV FRP $FWXDO ([DP 4XHVWLRQV .LOOH[DPV FRP SURYLGHV DFWXDO H[DP TXHVWLRQV WKDW DUH H[SHULHQFHG LQ WHVW FHQWHUV 7KHVH TXHVWLRQV DUH XSGDWHG UHJXODUO\ WR HQVXUH WKH\ DUH XS WR GDWH DQG UHOHYDQW WR WKH ODWHVW H[DP V\OODEXV %\ VWXG\LQJ WKHVH DFWXDO TXHVWLRQV FDQGLGDWHV FDQ IDPLOLDUL]H WKHPVHOYHV ZLWK WKH FRQWHQW DQG IRUPDW RI WKH UHDO H[DP ([DP 'XPSV .LOOH[DPV FRP RIIHUV H[DP GXPSV LQ 3') IRUPDW 7KHVH GXPSV FRQWDLQ D FRPSUHKHQVLYH FROOHFWLRQ RI TXHVWLRQV DQG DQVZHUV WKDW FRYHU WKH H[DP WRSLFV %\ XVLQJ WKHVH GXPSV FDQGLGDWHV FDQ HQKDQFH WKHLU NQRZOHGJH DQG LPSURYH WKHLU FKDQFHV RI VXFFHVV LQ WKH FHUWLILFDWLRQ H[DP 3UDFWLFH 7HVWV .LOOH[DPV FRP SURYLGHV SUDFWLFH WHVWV WKURXJK WKHLU GHVNWRS 9&( H[DP VLPXODWRU DQG RQOLQH WHVW HQJLQH 7KHVH SUDFWLFH WHVWV VLPXODWH WKH UHDO H[DP HQYLURQPHQW DQG KHOS FDQGLGDWHV DVVHVV WKHLU UHDGLQHVV IRU WKH DFWXDO H[DP 7KH SUDFWLFH WHVWV FRYHU D ZLGH UDQJH RI TXHVWLRQV DQG HQDEOH FDQGLGDWHV WR LGHQWLI\ WKHLU VWUHQJWKV DQG ZHDNQHVVHV *XDUDQWHHG 6XFFHVV .LOOH[DPV FRP RIIHUV D VXFFHVV JXDUDQWHH ZLWK WKHLU H[DP GXPSV 7KH\ FODLP WKDW E\ XVLQJ WKHLU PDWHULDOV FDQGLGDWHV ZLOO SDVV WKHLU H[DPV RQ WKH ILUVW DWWHPSW RU WKH\ ZLOO UHIXQG WKH SXUFKDVH SULFH 7KLV JXDUDQWHH SURYLGHV DVVXUDQFH DQG FRQILGHQFH WR LQGLYLGXDOV SUHSDULQJ IRU FHUWLILFDWLRQ H[DPV 8SGDWHG &RQWHQW .LOOH[DPV FRP UHJXODUO\ XSGDWHV LWV TXHVWLRQ EDQN DQG H[DP GXPSV WR HQVXUH WKDW WKH\ DUH FXUUHQW DQG UHIOHFW WKH ODWHVW FKDQJHV LQ WKH H[DP V\OODEXV 7KLV KHOSV FDQGLGDWHV VWD\ XS WR GDWH ZLWK WKH H[DP FRQWHQW DQG LQFUHDVHV WKHLU FKDQFHV RI VXFFHVV 7HFKQLFDO 6XSSRUW .LOOH[DPV FRP SURYLGHV IUHH [ WHFKQLFDO VXSSRUW WR DVVLVW FDQGLGDWHV ZLWK DQ\ TXHULHV RU LVVXHV WKH\ PD\ HQFRXQWHU ZKLOH XVLQJ WKHLU VHUYLFHV 7KHLU FHUWLILHG H[SHUWV DUH DYDLODEOH WR SURYLGH JXLGDQFH DQG KHOS FDQGLGDWHV WKURXJKRXW WKHLU H[DP SUHSDUDWLRQ MRXUQH\ 'PS .PSF FYBNT WJTJU IUUQT LJMMFYBNT DPN WFOEPST FYBN MJTU .LOO \RXU H[DP DW )LUVW $WWHPSW *XDUDQWHHG