This page was exported from New Real Practice Test With VCE And PDF For Free Download [ http://www.actualtest.info ] Export date:Tue Apr 16 4:51:12 2024 / +0000 GMT ___________________________________________________ Title: [Premium](100% Valid) Practice Passleader New Oracle 1Z0-803 Dumps To Pass Exam With Ease (61-75) --------------------------------------------------- Valid Tips For 100% 1Z0-803 Exam Pass: We PassLeader now provide the best 1Z0-803 169q study materials for your 1Z0-803 certification exam. We offer the latest 1Z0-803 169q exam questions to ensure that you 100 percent pass exam, and what's more, we will offer you the new updated 1Z0-803 169q exam dumps for one year free and free new version VCE Player. Vendor: OracleExam Code: 1Z0-803Exam Name: Java SE 7 Programmer I QUESTION 61Given:public class MyFor3 {public static void main(String [] args) {int [] xx = null;System.out.println(xx);}}What is the result? A.    nullB.    compilation failsC.    Java.lang.NullPointerExceptionD.    0 Answer: A QUESTION 62Given:public class Main {public static void main (String[] args) {doSomething();}private static void doSomething() {doSomeThingElse();}private static void doSomeThingElse() {throw new Exception();}}Which approach ensures that the class can be compiled and run? A.    Put the throw new Exception() statement in the try block of try ?catchB.    Put the doSomethingElse() method in the try block of a try ?catchC.    Put the doSomething() method in the try block of a try ?catchD.    Put the doSomething() method and the doSomethingElse() method in the try block of a try ?catch Answer: A QUESTION 63Given:public class ScopeTest1 {public static void main(String[] args) {doStuff(); // line x1int x1 = x2; // line x2int x2 = j; // line x3}static void doStuff() {System.out.println(j); // line x4}static int j;}Which line causes a compilation error? A.    line x1B.    line x2C.    line x3D.    line x4 Answer: B QUESTION 64Given:class Overloading {void x (int i) {System.out.println("one");}void x (String s) {System.out.println("two");}void x (double d) {System.out.println("three");}public static void main(String[] args) {new Overloading().x (4.0);}}What is the result? A.    OneB.    TwoC.    ThreeD.    Compilation fails Answer: C QUESTION 65Which declaration initializes a boolean variable? A.    boolean h = 1;B.    boolean k = 0;C.    boolean m = null;D.    boolean j = (1 < 5) ; Answer: D QUESTION 66Given:public class Basic {private static int letter;public static int getLetter();public static void Main(String[] args) {System.out.println(getLetter());}}Why will the code not compile? A.    A static field cannot be private.B.    The getLetter method has no body.C.    There is no setletter method.D.    The letter field is uninitialized.E.    It contains a method named Main instead of ma Answer: B QUESTION 67Given:public class Circle {double radius;public double area:public Circle (double r) { radius = r;}public double getRadius() {return radius;}public void setRadius(double r) { radius = r;}public double getArea() { return /* ??? */;}}class App {public static void main(String[] args) {Circle c1 = new Circle(17.4);c1.area = Math.PI * c1.getRadius() * c1.getRadius();}}This class is poorly encapsulated. You need to change the circle class to compute and return the area instead. What three modifications are necessary to ensure that the class is being properly encapsulated? A.    Change the access modifier of the setradius () method to privateB.    Change the getArea () method:public double getArea () { return area; }C.    When the radius is set in the Circle constructor and the setRadius () method, recomputed the area and store it into the area fieldD.    Change the getRadius () method:public double getRadius () {area = Math.PI * radius * radius;return radius;} Answer: ABC http://www.passleader.com/1z0-803.html QUESTION 68Given a code fragment:StringBuilder sb = new StringBuilder ();String h1 = "HelloWorld";sb.append("Hello").append ("world");if (h1 == sb.toString()) {System.out.println("They match");}if (h1.equals(sb.toString())) {System.out.println("They really match");}What is the result? A.    They matchThey really matchB.    They really matchC.    They matchD.    Nothing is printed to the screen Answer: D QUESTION 69Which two are possible outputs?public class Two {public static void main(String[] args) {try {doStuff();system.out.println("1");}catch {system.out.println("2");}}public static void do Stuff() {if (Math.random() > 0.5) throw new RunTimeException(); doMoreStuff();System.out.println("3 ");}public static void doMoreStuff() {System.out.println("4");}} A.    2B.    431C.    1D.    12 Answer: AB QUESTION 70Given:public class MyFor {public static void main(String[] args) {for (int ii = 0; ii < 4; ii++) {System.out.println("ii = "+ ii);ii = ii +1;}}}What is the result? A.    ii = 0ii = 2B.    ii = 0ii = 1ii = 2ii = 3C.    ii =D.    Compilation fails. Answer: A QUESTION 71Given the code fragment:int [][] array2d = new int[2][3];System.out.println("Loading the data.");for ( int x = 0; x < array2d.length; x++) {for ( int y = 0; y < array2d[0].length; y++) {System.out.println(" x = " + x);System.out.println(" y = " + y);// insert load statement here.}}System.out.println("Modify the data. ");for ( int x = 0; x < array2d.length; x++) {for ( int y = 0; y < array2d[0].length; y++) {System.out.println(" x = " + x);System.out.println(" y = " + y);// insert modify statement here.}}Which pair of load and modify statement should be inserted in the code? The load statement should set the array's x row and y column value to the sum of x and y.The modify statement should modify the array's x row and y column value by multiplying it by 2. A.    Load statement: array2d(x,y) = x + y;Modify statement: array2d(x,y) = array2d(x,y) * 2B.    B. Load statement: array2d[x y] = x + y;Modify statement: array2d[x y] = array2d[x y] * 2C.    Load statement: array2d[x,y] = x + y;Modify statement: array2d[x,y] = array2d[x,y] * 2D.    Load statement: array2d[x][y] = x + y;Modify statement: array2d[x][y] = array2d[x][y] * 2E.    Load statement: array2d[[x][y]] = x + y;Modify statement: array2d[[x][y]] = array2d[[x][y]] * 2 Answer: D QUESTION 72Given:public class DoBreak1 {public static void main(String[] args) {String[] table = {"aa", "bb", "cc", "dd"};for (String ss: table) {if ( "bb".equals(ss)) {continue;}System.out.println(ss);if ( "cc".equals(ss)) {break;}}}}What is the result? A.    aaccB.    aabbccC.    ccddD.    ccE.    Compilation fails. Answer: A QUESTION 73Which three lines are illegal?1. class StaticMethods {2. static void one() {3. two();4. StaticMethods.two();5. three();6. StaticMethods.four();7. }8. static void two() { }9. void three() {10. one();11. StaticMethods.two();12. four();13. StaticMethods.four();14. }15. void four() { }16. } A.    line 3B.    line 4C.    line 5D.    line 6E.    line 10F.    line 11G.    line 12H.    line 13 Answer: CDH QUESTION 74Which is a valid abstract class? A.    public abstract class Car {protected void accelerate();}B.    public interface Car {protected abstract void accelerate();}C.    public abstract class Car {protected final void accelerate();}D.    public abstract class Car {protected abstract void accelerate();}E.    public abstract class Car {protected abstract void accelerate() {//more car can do}} Answer: D QUESTION 75View the exhibit:public class Student {public String name = "";public int age = 0;public String major = "Undeclared";public boolean fulltime = true;public void display() {System.out.println("Name: " + name + " Major: " + major); }public boolean isFullTime() {return fulltime;}}Given:Public class TestStudent {public static void main(String[] args) {Student bob = new Student ();bob.name = "Bob";bob.age = 18;bob.year = 1982;}}What is the result? A.    year is set to 1982.B.    bob.year is set to 1982C.    A runtime error is generated.D.    A compile time error is generated. Answer: D http://www.passleader.com/1z0-803.html --------------------------------------------------- Images: http://www.itexamquiz.com/passleader/plimages/eaa3a02c0e56_DB3F/PassLeader-1Z0-803-Braindumps16.jpg http://www.itexamquiz.com/passleader/plimages/eaa3a02c0e56_DB3F/PassLeader-1Z0-803-Braindumps24.jpg http://www.itexamquiz.com/passleader/plimages/eaa3a02c0e56_DB3F/PassLeader-1Z0-803-Braindumps8.jpg --------------------------------------------------- --------------------------------------------------- Post date: 2015-01-12 07:38:40 Post date GMT: 2015-01-12 07:38:40 Post modified date: 2015-01-12 07:38:40 Post modified date GMT: 2015-01-12 07:38:40 ____________________________________________________________________________________________ Export of Post and Page as text file has been powered by [ Universal Post Manager ] plugin from www.gconverters.com