Free Oracle 1Z0-808 Exam Braindumps (page: 4)

Given the code fragment:

  1. Option A
  2. Option B
  3. Option C
  4. Option D
  5. Option E

Answer(s): A,C



Given:



The class is poorly encapsulated. You need to change the circle class to compute and return the area instead.
Which two modifications are necessary to ensure that the class is being properly encapsulated?

  1. Remove the area field.
  2. Change the getArea( ) method as follows:
    public double getArea ( ) { return Match.PI * radius * radius; }
  3. Add the following method:
    public double getArea ( ) {area = Match.PI * radius * radius; }
  4. Change the cacess modifier of the SerRadius ( ) method to be protected.

Answer(s): B,D



Given the code fragment:



What is the result?

  1. 10 8 6 4 2 0
  2. 10 8 6 4 2
  3. AnArithmeticException is thrown at runtime
  4. The program goes into an infinite loop outputting: 10 8 6 4 2 0. . .
  5. Compilation fails

Answer(s): B



Given:



Which code fragment, when inserted at line 14, enables the code to print Mike Found?

  1. int f = ps.indexOf {new patient ("Mike")};
  2. int f = ps.indexOf (patient("Mike"));
  3. patient p = new Patient ("Mike");
    int f = pas.indexOf(P)
  4. int f = ps.indexOf(p2);

Answer(s): C



Viewing page 4 of 60
Viewing questions 13 - 16 out of 245 questions



Post your Comments and Discuss Oracle 1Z0-808 exam prep with other Community members:

1Z0-808 Exam Discussions & Posts