Free Oracle 1Z0-819 Exam Questions (page: 5)

Given:



What is the result?

  1. It throws a runtime exception.
  2. Value of Euler = 2.71828
  3. The code does not compile.
  4. Value of Euler = "2.71828"

Answer(s): C



Given:



executed using this command:

java Myclass My Car is red

What is the output of this class?

  1. Car--red--My
  2. My--Car--is
  3. My--is--java
  4. java--Myclass--My
  5. Myclass--Car--red

Answer(s): A



Given:



Which two allow a.Main to allocate a new Person? (Choose two.)

  1. In Line 1, change the access modifier to privateprivate Person() {
  2. In Line 1, change the access modifier to publicpublic Person() {
  3. In Line 2, add extends Person to the Main classpublic class Main extends Person {and change Line 3 to create a new Main objectPerson person = new Main();
  4. In Line 2, change the access modifier to protectedprotected class Main {
  5. In Line 1, remove the access modifierPerson() {

Answer(s): B,C



Given:



Which loop incurs a compile time error?

  1. the loop starting line 11
  2. the loop starting line 7
  3. the loop starting line 14
  4. the loop starting line 3

Answer(s): C



Viewing page 5 of 66



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

1Z0-819 Exam Discussions & Posts