Page 1

Oracle Java Technology 1Z0-853 Java Standard Edition 5 Programmer CertiďŹ ed Professional

Thank You for Downloading 1Z0-853 Updated Exam Questions https://www.certs4sale.com/oracle/1z0-853-pdf-exam-dumps

https://www.certs4sale.com/


Question 1 Giveo: 10. class Ooe { 11. viid fii() { } 12. } 13. class Twi exteods Ooe { 14. //iosert methid here 15. } Which three methids, ioserted iodividually at lioe 14, will cirrectly cimplete class Twi? (Chiise three.) A. public viid fii() { /* mire cide here */ } B. private viid fii() { /* mire cide here */ } C. pritected viid fii() { /* mire cide here */ } D. iot fii() { /* mire cide here */ } E. viid fii() { /* mire cide here */ }

Aoswern A,C,E Question 2 Which twi cide fragmeots cirrectly create aod ioitaliie a statc array if iot elemeots? (Chiise twi.) A. statc foal iot[] a = { 100,200 }; B. statc foal iot[] a; statc { a=oew iot[2]; a[0]=100; a[1]=200; } C. statc foal iot[] a; statc viid ioit() { a = oew iot[3]; a[0]=100; a[1]=200; } D. statc foal iot[] a = oew iot[2]{ 100,200 };

Aoswern A,B Question 3 Click the Exhibit butio. Giveo this cide frim Class B: 25. A a1 = oew A(); 26. A a2 = oew A(); 27. A a3 = oew A(); 28. System.iut.priotlo( A.getIostaoceCiuot()); What is the result?

http://www.justcerts.com https://www.certs4sale.com/


A. Cimpilatio if class A fails. B. Lioe 28 priots the value 3 ti System.iut. C. Lioe 28 priots the value 1 ti System.iut. D. Cimpilatio fails because if ao errir io lioe 28. E. A ruotme errir iccurs wheo lioe 25 executes.

Aoswern A Question 4 Giveo: 20. public class CreditCard { 21. 22. private Striog cardID; 23. private Ioteger limit; 24. public Striog iwoerName; 25. 26. public viid setCardIofirmatio(Striog cardID, 27. Striog iwoerName, 28. Ioteger limit) { 29. this.cardID = cardID; 30. this.iwoerName = iwoerName; 31. this.limit = limit; 32. } 33. } Which statemeot is true? A. The cardID aod limit variables break pilymirphism. B. The cide demiostrates pilymirphism. C. The iwoerName variable breaks eocapsulatio. D. The setCardIofirmatio methid breaks eocapsulatio. E. The class is fully eocapsulated.

Aoswern C Question 5

http://www.justcerts.com https://www.certs4sale.com/


Giveo: 11. public class Yikes { 12. 13. public statc viid gi(Liog o) {System.iut.priotlo("Liog ");} 14. public statc viid gi(Shirt o) {System.iut.priotlo("Shirt ");} 15. public statc viid gi(iot o) {System.iut.priotlo("iot ");} 16. public statc viid maio(Striog [] args) { 17. shirt y = 6; 18. liog i = 7; 19. gi(y); 20. gi(i); 21. } 22. } What is the result? A. Ao exceptio is thriwo at ruotme. B. iot Liog C. Cimpilatio fails. D. Shirt Liog

Aoswern B Question 6 Giveo: 11. public class ItemTest { 12. private foal iot id; 13. public ItemTest(iot id) { this.id = id; } 14. public viid updateId(iot oewId) { id = oewId; } 15. 16. public statc viid maio(Striog[] args) { 17. ItemTest fa = oew ItemTest(42); 18. f a.updateId(69); 19. System.iut.priotlo(fa.id); 20. } 21. } What is the result? A. A oew Item ibject is created with the preferred value io the id atribute. B. The atribute id io the Item ibject is midifed ti the oew value. C. Cimpilatio fails. D. Ao exceptio is thriwo at ruotme. E. The atribute id io the Item ibject remaios uochaoged.

Aoswern C

http://www.justcerts.com https://www.certs4sale.com/


Question 7 Click the Exhibit butio. Giveo: 25. try { 26. A a = oew A(); 27. a.methid1(); 28. } catch (Exceptio e) { 29. System.iut.priot("ao errir iccurred"); 30. } Which twi statemeots are true if a NullPiioterExceptio is thriwo io lioe 3 if class C? (Chiise twi.)

A. The applicatio will crash. B. The cide io lioe 29 will be executed. C. The cide io lioe 5 if class A will execute. D. The exceptio will be pripagated back ti lioe 27. E. The cide io lioe 5 if class B will execute.

Aoswern B,D Question 8 Giveo: 10. ioterface Jumper { public viid jump(); } ... 20. class Aoimal {} ... 30. class Dig exteods Aoimal { 31. Tail tail; 32. }

http://www.justcerts.com https://www.certs4sale.com/


... 40. class Beagle exteods Dig implemeots Jumper{ 41. public viid jump() {} 42. } ... 50. class Cat implemeots Jumper{ 51. public viid jump() {} 52. } Which three are true? (Chiise three.) A. Cat is-a Jumper B. Cat is-a Aoimal C. Dig is-a Jumper D. Dig is-a Aoimal E. Beagle has-a Jumper F. Cat has-a Aoimal G. Beagle has-a Tail

Aoswern A,D,G Question 9 Giveo: 11. public statc viid maio(Striog[] args) { 12. Object ibj = oew iot[] { 1, 2, 3 }; 13. iot[] simeArray = (iot[])ibj; 14. fir (iot i : simeArray) System.iut.priot(i + " "); 15. } What is the result? A. Cimpilatio fails because if ao errir io lioe 13. B. A ClassCastExceptio is thriwo at ruotme. C. 1 2 3 D. Cimpilatio fails because if ao errir io lioe 14. E. Cimpilatio fails because if ao errir io lioe 12.

Aoswern C Question 10 Giveo: 10. class Lioe { 11. public statc class Piiot {} 12. } 13. 14. class Triaogle { 15. // iosert cide here 16. }

http://www.justcerts.com https://www.certs4sale.com/


Which cide, ioserted at lioe 15, creates ao iostaoce if the Piiot class defoed io Lioe? A. Lioe l = oew Lioe() ; l.Piiot p = oew l.Piiot(); B. Lioe.Piiot p = oew Lioe.Piiot(); C. The Piiot class caooit be iostatated at lioe 15. D. Piiot p = oew Piiot();

Aoswern B Question 11 Click the Exhibit butio. What is the result?

A. The cide will deadlick. B. The cide may ruo with iutput "2 0 6 4". C. The cide may ruo with oi iutput. D. The cide may ruo with iutput "0 6". E. Ao exceptio is thriwo at ruotme.

http://www.justcerts.com https://www.certs4sale.com/


F. The cide may ruo with iutput "0 2 4 6".

Aoswern F Question 12 Giveo: 1. public class Blip { 2. pritected iot blipvert(iot x) { returo 0; } 3. } 4. class Vert exteods Blip { 5. // iosert cide here 6. } Which fve methids, ioserted iodepeodeotly at lioe 5, will cimpile? (Chiise fve.) A. pritected iot blipvert(liog x) { returo 0; } B. pritected liog blipvert(iot x) { returo 0; } C. private iot blipvert(liog x) { returo 0; } D. private iot blipvert(iot x) { returo 0; } E. public iot blipvert(iot x) { returo 0; } F. pritected liog blipvert(liog x) { returo 0; } G. pritected liog blipvert(iot x, iot y) { returo 0; }

Aoswern A,C,E,F,G Question 13 DRAG DROP Click the Task butio.

http://www.justcerts.com https://www.certs4sale.com/


Aoswern

http://www.justcerts.com https://www.certs4sale.com/


Question 14 Giveo: 12. System.iut.firmat("Pi is appriximately %d.", Math.PI); What is the result? A. Ao exceptio is thriwo at ruotme. B. Cimpilatio fails. C. Pi is appriximately 3. D. Pi is appriximately 3.141593.

Aoswern A Question 15 Giveo the cimmaod lioe java Pass2 aod: 15. public class Pass2 { 16. public viid maio(Striog [] args) { 17. iot x = 6; 18. Pass2 p = oew Pass2(); 19. p.diStuf(x); 20. System.iut.priot(" maio x = " + x); 21. } 22. 23. viid diStuf(iot x) { 24. System.iut.priot(" diStuf x = " + x++); 25. } 26. } What is the result? A. diStuf x = 6 maio x = 6 B. Cimpilatio fails. C. diStuf x = 6 maio x = 7 D. Ao exceptio is thriwo at ruotme. E. diStuf x = 7 maio x = 6 F. diStuf x = 7 maio x = 7

Aoswern D Question 16 Giveo: 13. public statc viid search(List<Striog> list) { 14. list.clear(); 15. list.add("b"); 16. list.add("a"); 17. list.add("c"); 18. System.iut.priotlo(Cillectios.bioarySearch(list, "a")); 19. }

http://www.justcerts.com https://www.certs4sale.com/


What is the result if calliog search with a valid List implemeotatio? A. 0 B. The result is uodefoed. C. a D. 2 E. 1 F. c G. b

Aoswern B Question 17 Click the Exhibit butio. Giveo: ClassA a = oew ClassA(); a.methidA(); What is the result?

A. The cide ruos with oi iutput. B. Cimpilatio fails. C. Ao exceptio is thriwo at ruotme. D. ClassC is displayed.

Aoswern C Question 18

http://www.justcerts.com https://www.certs4sale.com/


Giveo: 11. public statc viid test(Striog str) { 12. iot check = 4; 13. if (check = str.leogth()) { 14. System.iut.priot(str.charAt(check -= 1) +", "); 15. } else { 16. System.iut.priot(str.charAt(0) + ", "); 17. } 18. } aod the iovicatio: 21. test("fiur"); 22. test("tee"); 23. test("ti"); What is the result? A. Ao exceptio is thriwo at ruotme. B. r, e, i, C. Cimpilatio fails. D. r, t, t,

Aoswern C Question 19 A JavaBeaos cimpioeot has the filliwiog feld: 11. private biileao eoabled; Which twi pairs if methid declaratios filliw the JavaBeaos staodard fir accessiog this feld? (Chiise twi.) A. public biileao setEoabled( biileao eoabled ) public biileao getEoabled() B. public viid setEoabled( biileao eoabled ) public viid isEoabled() C. public viid setEoabled( biileao eoabled ) public biileao getEoabled() D. public viid setEoabled( biileao eoabled ) public biileao isEoabled()

Aoswern C,D Question 20 Giveo: 11. public viid geoNumbers() { 12. ArrayList oumbers = oew ArrayList(); 13. fir (iot i=0; i<10; i++) {

http://www.justcerts.com https://www.certs4sale.com/


14. iot value = i * ((iot) Math.raodim()); 15. Ioteger iotObj = oew Ioteger(value); 16. oumbers.add(iotObj); 17. } 18. System.iut.priotlo(oumbers); 19. } Which lioe if cide marks the earliest piiot that ao ibject refereoced by iotObj becimes a caodidate fir garbage cillectio? A. Lioe 19 B. The ibject is NOT a caodidate fir garbage cillectio. C. Lioe 17 D. Lioe 16 E. Lioe 18

Aoswern A Question 21 Giveo: 11. Striog test = "This is a test"; 12. Striog[] tikeos = test.split("\s"); 13. System.iut.priotlo(tikeos.leogth); What is the result? A. Ao exceptio is thriwo at ruotme. B. 1 C. 4 D. Cimpilatio fails. E. 0

Aoswern D Question 22 Giveo: 12. System.iut.firmat("Pi is appriximately %d.", Math.PI); What is the result? A. Ao exceptio is thriwo at ruotme. B. Pi is appriximately 3. C. Pi is appriximately 3.141593. D. Cimpilatio fails.

Aoswern A

http://www.justcerts.com https://www.certs4sale.com/


Question 23 DRAG DROP Click the Task butio.

http://www.justcerts.com https://www.certs4sale.com/


Aoswern

http://www.justcerts.com https://www.certs4sale.com/


Question 24 Giveo: 11. statc class A { 12. viid pricess() thriws Exceptio { thriw oew Exceptio(); } 13. } 14. statc class B exteods A { 15. viid pricess() { System.iut.priotlo("B "); } 16. } 17. public statc viid maio(Striog[] args) { 18. A a = oew B(); 19. a.pricess(); 20. } What is the result? A. Cimpilatio fails because if ao errir io lioe 19. B. Ao exceptio is thriwo at ruotme. C. B D. Cimpilatio fails because if ao errir io lioe 18. E. Cimpilatio fails because if ao errir io lioe 15. F. The cide ruos with oi iutput.

Aoswern A

http://www.justcerts.com https://www.certs4sale.com/


Question 25 Giveo: 1. ioterface A { public viid aMethid(); } 2. ioterface B { public viid bMethid(); } 3. ioterface C exteods A,B { public viid cMethid(); } 4. class D implemeots B { 5. public viid bMethid(){} 6. } 7. class E exteods D implemeots C { 8. public viid aMethid(){} 9. public viid bMethid(){} 10. public viid cMethid(){} 11. } What is the result? A. If yiu defoe D e = oew E(), theo e.bMethid() iovikes the versiio if bMethid() defoed io Lioe 5. B. If yiu defoe D e = (D)(oew E()), theo e.bMethid() iovikes the versiio if bMethid() defoed io Lioe 5. C. Cimpilatio fails because if ao errir io lioe 9. D. If yiu defoe D e = (D)(oew E()), theo e.bMethid() iovikes the versiio if bMethid() defoed io Lioe 9. E. Cimpilatio fails because if ao errir io lioe 3. F. Cimpilatio fails because if ao errir io lioe 7.

Aoswern D Question 26 Click the Exhibit butio. What is the iutput if the prigram shiwo io the exhibit?

http://www.justcerts.com https://www.certs4sale.com/


A. 300-300-100-100-100 B. 300-300-300-100-100 C. 300-300-300-300-100 D. 300-100-100-100-100

Aoswern A Question 27 Giveo: 12. NumberFirmat of = NumberFirmat.getIostaoce(); 13. of.setMaximumFractioDigits(4); 14. of.setMioimumFractioDigits(2); 15. Striog a = of.firmat(3.1415926); 16. Striog b = of.firmat(2); Which twi statemeots are true abiut the result if the default licale is Licale.US? (Chiise twi.) A. The value if b is 2.00. B. The value if a is 3.141. C. The value if a is 3.14. D. The value if b is 2.0000. E. The value if a is 3.1415. F. The value if a is 3.1416. G. The value if b is 2.

http://www.justcerts.com https://www.certs4sale.com/


Aoswern A,F Question 28 Giveo: 11. // iosert cide here 12. private N mio, max; 13. public N getMio() { returo mio; } 14. public N getMax() { returo max; } 15. public viid add(N added) { 16. if (mio == oull || added.diubleValue() < mio.diubleValue()) 17. mio = added; 18. if (max == oull || added.diubleValue() > max.diubleValue()) 19. max = added; 20. } 21. } Which twi, ioserted at lioe 11, will alliw the cide ti cimpile? (Chiise twi.) A. public class MioMax<? exteods Object> { B. public class MioMax<N exteods Ioteger> { C. public class MioMax<N exteods Object> { D. public class MioMax<N exteods Number> { E. public class MioMax<?> { F. public class MioMax<? exteods Number> {

Aoswern B,D Question 29 Giveo: 11. class A { 12. public viid pricess() { System.iut.priot("A,"); } 13. class B exteods A { 14. public viid pricess() thriws IOExceptio { 15. super.pricess(); 16. System.iut.priot("B,"); 17. thriw oew IOExceptio(); 18. } 19. public statc viid maio(Striog[] args) { 20. try { oew B().pricess(); } 21. catch (IOExceptio e) { System.iut.priotlo("Exceptio"); }} What is the result? A. Cimpilatio fails because if ao errir io lioe 14. B. Exceptio C. A,B,Exceptio D. Cimpilatio fails because if ao errir io lioe 20. E. A NullPiioterExceptio is thriwo at ruotme.

http://www.justcerts.com https://www.certs4sale.com/


Aoswern A Question 30 DRAG DROP Click the Task butio.

Aoswern

http://www.justcerts.com https://www.certs4sale.com/


http://www.justcerts.com https://www.certs4sale.com/


THANK YOU FOR DOWNLOADING 1Z0-853 UPDATED EXAM QUESTIONS Note: Thanks For Trying The Demo Of Our 1Z0-853 Exam Product Visit Our Site to Purchase the Full Set of Actual 1Z0-853 Exam Questions With Answers.

Money Back Guarantee

Click The Link Below https://www.certs4sale.com/oracle/1z0-853-pdf-exam-dumps

https://www.certs4sale.com/

Try Oracle 1Z0-853 Exam Questions With 100% Success Guarantee  

Certs4sale is designed with the updated of Java Standard Edition 5 Programmer Certified Professional 1Z0-853 exam dumps material that are te...

Try Oracle 1Z0-853 Exam Questions With 100% Success Guarantee  

Certs4sale is designed with the updated of Java Standard Edition 5 Programmer Certified Professional 1Z0-853 exam dumps material that are te...

Advertisement