This page was exported from Braindump2go Free Exam Dumps with PDF and VCE Collection [ https://www.mcitpdump.com ] Export date:Fri Nov 22 6:02:06 2024 / +0000 GMT ___________________________________________________ Title: [2016-May-NEW]1Z0-803 271q VCE Dumps Free Provided By Braindump2go for Free Downloading[NQ11-NQ20] --------------------------------------------------- 2016 May Oracle Official News - 1Z0-803: Java SE 7 Programmer I Exam Questions New Updated Today! Braindump2go.com Offers 1Z0-803 New Questions and Answers for Free Download!NEW QUESTION 11 - NEW QUESTION 20   QUESTION 11Given: Which three lines will compile and output "right on!"? A.    Line 5B.    Line 6C.    Line 7D.    Line 8E.    Line 9F.    Line 10 Answer: CDF QUESTION 12Given the code fragment:String h1 = "Bob";String h2 = new String ("Bob");What is the best way to test that the values of h1 and h2 are the same? A.    if (h1 == h2)B.    if (h1.equals(h2))C.    if (h1 = = h2)D.    if (h1.same(h2)) Answer: BExplanation: The equals method compares values for equality.Incorrect answers:The strings are not the same objects so the == comparison fails. See note #1 below. As the value of the strings are the same equals is true. The equals compares values for equality.There is no generic comparison method named same.= = (with a space) is not a valid method.Note: #1 ==Compares references, not values. The use of == with object references is generally limited to the following:Comparing to see if a reference is null.Comparing two enum values. This works because there is only one object for each enum constant.You want to know if two references are to the same object. QUESTION 13Which two are valid declarations of a two-dimensional array? A.    int[][] array2D;B.    int[2][2] array2D;C.    int array2D[];D.    int[] array2D[];E.    int[][] array2D[]; Answer: ADExplanation: int[][] array2D; is the standard convention to declare a 2-dimensional integer array.int[] array2D[]; works as well, but it is not recommended.Incorrect answers:int[2][2] array2D;The size of the array cannot be defined this way.int array2D[]; is good definition of a one-dimensional array. int[] []array2D[];is good definition of a three-dimensional array. QUESTION 14Given: Which two are possible outputs?  A.    Option AB.    Option BC.    Option CD.    Option D Answer: ADExplanation: The first println statement, System.out.println("Before if clause");, will always run.If Math.Random() > 0.5 then there is an exception. The exception message is displayed and the program terminates.If Math.Random() > 0.5 is false, then the second println statement runs as well.Incorrect answers:B: The second println statement would not run.C: The first println statement will always run. QUESTION 15Given the code fragment:System.out.println ("Result:" +3+5);System.out.println ("result:" + (3+5));What is the result? A.    Result: 8Result: 8B.    Result: 35Result: 8C.    Result: 8Result: 35D.    Result: 35Result: 35 Answer: BExplanation: In the first statement 3 and 5 are treated as strings and are simply concatenated.In the first statement 3 and 5 are treated as integers and their sum is calculated. QUESTION 16A method doSomething () that has no exception handling code is modified to trail a method that throws a checked exception.Which two modifications, made independently, will allow the program to compile? A.    Catch the exception in the method doSomething().B.    Declare the exception to be thrown in the doSomething() method signature.C.    Cast the exception to a RunTimeException in the doSomething() method.D.    Catch the exception in the method that calls doSomething(). Answer: ABExplanation: Valid Java programming language code must honor the Catch or Specify Requirement. This means that code that might throw certain exceptions must be enclosed by either of the following:* A try statement that catches the exception. The try must provide a handler for the exception, asdescribed in Catching and Handling Exceptions.* A method that specifies that it can throw the exception. The method must provide a throwsclause that lists the exception, as described in Specifying the Exceptions Thrown by a Method.Code that fails to honor the Catch or Specify Requirement will not compile. QUESTION 17Which two may precede the word "class" in a class declaration? A.    localB.    publicC.    staticD.    volatileE.    synchronized Answer: BCExplanation: B: A class can be declared as public or private.C: You can declare two kinds of classes: top-level classes and inner classes.You define an inner class within a top-level class. Depending on how it is defined, an inner classcan be one of the following four types:Anonymous, Local, Member and Nested top-level.A nested top-level class is a member classes with astaticmodifier. A nested top-level class is justlike any other top-level class except that it is declared within another class or interface. Nestedtop-level classes are typically used as a convenient way to group related classes without creatinga new package.The following is an example:public class Main {static class Killer { QUESTION 18Given the code fragment:What is the result?  A.    Found RedB.    Found RedFound BlueC.    Found RedFound BlueFound WhiteD.    Found RedFound BlueFound WhiteFound Default Answer: BExplanation: As there is no break statement after the case "Red" statement the case Blue statement will run as well.Note: The body of a switch statement is known as a switch block. A statement in the switch blockcan be labeled with one or more case or default labels. The switch statement evaluates its expression, then executes all statements that follow the matching case label.Each break statement terminates the enclosing switch statement. Control flow continues with thefirst statement following the switch block. The break statements are necessary because withoutthem, statements in switch blocksfall through: All statements after the matching case label areexecuted in sequence, regardless of the expression of subsequent case labels, until a breakstatement is encountered. QUESTION 19Given: What code should be inserted?  A.    Option AB.    Option BC.    Option CD.    Option DE.    Option EF.    Option F Answer: CExplanation: Dog should be an abstract class. The correct syntax for this is: abstract class Dog { Poodle should extend Dog (not implement). QUESTION 20Which three are bad practices? A.    Checking for ArrayindexoutofBoundsException when iterating through an array to determinewhen all elements have been visitedB.    Checking for Error and. If necessary, restartingthe program to ensure that users are unaware problemsC.    Checking for FileNotFoundException to inform a user that a filename entered is not validD.    Checking for ArrayIndexoutofBoundsExcepcion and ensuring that the program can recover if one occurE.    Checking for an IOException and ensuring that the program can recover if one occurs Answer: ABD 2016 Valid Oracle 1Z0-803 Exam Study Materials: 1.| Latest 1Z0-803 Exam VCE and PDF Dumps 271q from Braindump2go: http://www.braindump2go.com/1z0-803.html [100% Exam Pass Guaranteed!] 2.| New 1Z0-803 Exam Questions and Answers - Google Drive: https://drive.google.com/folderview?id=0B75b5xYLjSSNTUpTSzVyeEw0WW8&usp=sharing   MORE Practice is the Most Important IF You want to PASS 70-341 Exam 100%! --------------- Braindump2go.com--------------- Pass All IT Exams at the first Try! --------------------------------------------------- Images: --------------------------------------------------- --------------------------------------------------- Post date: 2016-05-31 03:19:04 Post date GMT: 2016-05-31 03:19:04 Post modified date: 2016-05-31 03:19:04 Post modified date GMT: 2016-05-31 03:19:04 ____________________________________________________________________________________________ Export of Post and Page as text file has been powered by [ Universal Post Manager ] plugin from www.gconverters.com