This page was exported from Easily Pass By Training Lead2pass Latest Dumps [ https://www.freebraindump.com ] Export date:Sun Apr 20 22:53:13 2025 / +0000 GMT ___________________________________________________ Title: [Full Version] Free Download Lead2pass Oracle 1Z0-808 VCE And PDF Dumps (121-141) --------------------------------------------------- 2017 March Oracle Official New Released 1Z0-808 Q&As in Lead2pass.com! 100% Free Download! 100% Pass Guaranteed! Since I recently passed the the Oracle 1Z0-808 exam, it's time for me to share the Lead2pass exam dumps I used when preparing for this exam. Following questions and answers are all new published by Oracle Official Exam Center: http://www.lead2pass.com/1z0-808.html QUESTION 121Given: public class TestLoop {public static void main(String[] args) {int array[] = {0, 1, 2, 3, 4};int key = 3;for (int pos = 0; pos < array.length; ++pos) {if (array[pos] == key) {break;}}System.out.print("Found " + key + "at " + pos);}} What is the result? A.    Found 3 at 2B.    Found 3 at 3C.    Compilation failsD.    An exception is thrown at runtimeAnswer: CExplanation:The following line does not compile:System.out.print("Found " + key + "at " + pos);The variable pos is undefined at this line, as its scope is only valid in the for loop. Any variables created inside of a loop are LOCAL TO THE LOOP. QUESTION 122Given: import java.util.*;public class Ref {public static void main(String[] args) {StringBuilder s1 = new StringBuilder("Hello Java!");String s2 = s1.toString();List<String> lst = new ArrayList<String>();lst.add(s2);System.out.println(s1.getClass());System.out.println(s2.getClass());System.out.println(lst.getClass());}} What is the result? A.    class java.lang.Stringclass java.lang.Stringclass java.util.ArrayListB.    class java.lang.Objectclass java.lang. Objectclass java.util.CollectionC.    class java.lang.StringBuilderclass java.lang.Stringclass java.util.ArrayListD.    class java.lang.StringBuilderclass java.lang.Stringclass java.util.List Answer: CExplanation:class java.lang.StringBuilderclass java.lang.Stringclass java.util.ArrayList QUESTION 123Given:   What is the result? A.    boxB.    nboC.    boD.    nbE.    An exception is thrown at runtime Answer: E QUESTION 124Given:   Which is true? A.    Sum for 0 to 0 = 55B.    Sum for 0 to 10 = 55C.    Compilation fails due to error on line 6.D.    Compilation fails due to error on line 7.E.    An Exception is thrown at the runtime. Answer: DExplanation:Loop variables scope limited to that enclosing loop. So in this case, the scope of the loop variable x declared at line 5, limited to that for loop. Trying to access that variable at line 7, which is out of scope of the variable x, causes a compile time error. So compilation fails due to error at line 7. Hence option D is correct. Options A and B are incorrect, since code fails to compile. Reference: httpsy/docs.oracle.com/javase/tutorial/java/nutsandbolts/variables.html QUESTION 125Given the code fragment:   What is the result? A.    28false29trueB.    285 < 429trueC.    truetrueD.    compilation fails Answer: C QUESTION 126Given: public class Equal {public static void main(String[] args) {String str1 = "Java";String[] str2 = {"J","a","v","a"};String str3 = "";for (String str : str2) {str3 = str3+str;}boolean b1 = (str1 == str3);boolean b2 = (str1.equals(str3));System.out.print(b1+", "+b2);} What is the result? A.    true, falseB.    false, trueC.    true, trueD.    false, false Answer: BExplanation:== strict equality.equals compare state, not identity. QUESTION 127Given:   What is the result? A.    0DoneB.    First ExceptionDoneC.    Second ExceptionD.    DoneThird ExceptionE.    Third Exception Answer: B QUESTION 128Given: public class Marklist {int num;public static void graceMarks(Marklist obj4) {obj4.num += 10;}public static void main(String[] args) {MarkList obj1 = new MarkList();MarkList obj2 = obj1;MarkList obj1 = null;obj2.num = 60;graceMarks(obj2);}} How many objects are created in the memory runtime? A.    1B.    2C.    3D.    4 Answer: BExplanation:obj1 and obj3.when you do e2 = e1 you're copying object references - you're not making a copy of the object - and so the variables e1 and e2 will both point to the same object. QUESTION 129Given:   A.    X XXB.    X Y XC.    Y Y XD.    Y YY Answer: D QUESTION 130Given:   Which code fragment, when inserted at line 14, enables the code to print Mike Found? A.    int f = ps.indexOf {new patient ("Mike")};B.    int f = ps.indexOf (patient("Mike"));C.    patient p = new Patient ("Mike");int f = pas.indexOf(P)D.    int f = ps.indexOf(p2); Answer: C QUESTION 131Given: public class Test {public static void main(String[] args) {try {String[] arr =new String[4];arr[1] = "Unix";arr[2] = "Linux";arr[3] = "Solarios";for (String var : arr) {System.out.print(var + " ");}} catch(Exception e) {System.out.print (e.getClass());}}} What is the result? A.    Unix Linux SolarisB.    Null Unix Linux SolarisC.    Class java.lang.ExceptionD.    Class java.lang.NullPointerException Answer: BExplanation:null Unix Linux SolariosThe first element, arr[0], has not been defined. QUESTION 132Given:   What is the result? A.    2 4 6 8 10 12B.    2 4 6 8 10 12 14C.    Compilation failsD.    The program prints multiple of 2 infinite timesE.    The program prints nothing Answer: B QUESTION 133Which of the following can fill in the blank in this code to make it compile?   A.    abstractB.    publicC.    defaultD.    It will not compile with any as interfaces cannot have non abstract methods.E.    It will compile without filling the blank. Answer: CExplanation:From Java SE 8, we can use static and/or default methods in interfaces, but they should be non abstract methods. SO in this case using default in blank is completely legal. Hence option C is correct.Option A is incorrect as given method is not abstract, so can't use abstract there. Options B and E are incorrect as we can't have non abstract method interface if they are not default or static.https;//docs.oraclexom/javase/tutorial/java/Iandl/defaultmethods.html QUESTION 134Consider following method   Which statement is true? A.    This method is invalid.B.    This method can be used only in an interface.C.    This method can return anything.D.    This method can be used only in an interface or an abstract class.E.    None of above. Answer: BExplanation:Given method is declared as default method so we can use it only inside an interface.Hence option B is correct and option D is incorrect. Option A is incorrect as it is valid method. Option C is incorrect as return type is void, which means we can't return anything. QUESTION 135Given:   What is the result? A.    NullB.    Compilation failsC.    An exception is thrown at runtimeD.    0 Answer: C QUESTION 136Given:   Which code fragment, when inserted at line 7, enables the code print true?   A.    Option AB.    Option BC.    Option CD.    Option D Answer: A QUESTION 137Given: class Base {public static void main(String[] args) {System.out.println("Base " + args[2]);}}public class Sub extends Base{public static void main(String[] args) {System.out.println("Overriden " + args[1]);}}And the commands:javac Sub.javajava Sub 10 20 30 What is the result? A.    Base 30B.    Overridden 20C.    Overridden 20Base 30D.    Base 30Overridden 20 Answer: B QUESTION 138Given:   What will be the output?   A.    Option AB.    Option BC.    Option CD.    Option D Answer: D QUESTION 139Given the code fragments:   What is the result? A.    SuperSubSubB.    ContractContractSuperC.    Compilation fails at line n1D.    Compilation fails at line n2 Answer: D QUESTION 140Given:   What is the result? A.    true trueB.    true falseC.    false trueD.    false falseE.    Compilation fails Answer: E QUESTION 141Given:   What is the result? A.    Good Day!Good Luck!B.    Good Day!Good Day!C.    Good Luck!Good Day!D.    Good Luck!Good Luck!E.    Compilation fails Answer: E I hope Lead2pass exam questions from the Oracle 1Z0-808 exam helps you pass the exam and earn your Oracle certification! Happy Studying! 1Z0-808 new questions on Google Drive: https://drive.google.com/open?id=0B3Syig5i8gpDcUlVNUZXak8zSGc 2017 Oracle 1Z0-808 exam dumps (All 256 Q&As) from Lead2pass: http://www.lead2pass.com/1z0-808.html [100% Exam Pass Guaranteed!!!] --------------------------------------------------- Images: --------------------------------------------------- --------------------------------------------------- Post date: 2017-03-16 02:31:50 Post date GMT: 2017-03-16 02:31:50 Post modified date: 2017-03-16 02:31:50 Post modified date GMT: 2017-03-16 02:31:50 ____________________________________________________________________________________________ Export of Post and Page as text file has been powered by [ Universal Post Manager ] plugin from www.gconverters.com