Download Oracle 1z1-808 Mock Test Study Material [Q112-Q129]

Share

Download Oracle 1z1-808 Mock Test Study Material

1z1-808 Questions Prepare with Learning Information

NEW QUESTION # 112
Given:

What is the result?

  • A. 3 4 5 6
  • B. 3 6 5 6
  • C. 3 4 3 6
  • D. 5 4 5 6

Answer: B

Explanation:


NEW QUESTION # 113
Given:

And given the code fragment:
Book book1 = new EBook ();
Book1.readBook();
Which option enables the code to compile?

  • A. Option A
  • B. Option D
  • C. Option B
  • D. Option C

Answer: A


NEW QUESTION # 114
Which of the following data types will allow the following code snippet to compile?

  • A. double
  • B. float
  • C. byte
  • D. int
  • E. long

Answer: A,B

Explanation:
Option B and D are the correct answer.
Since the variables I and j are floats, resultant will be float type too. So we have to use float
or primitive type which can hold float, such a primitive type is double, it has wider range
and also can hold floating point numbers, hence we can use double or float for the blank.
As explained above options B and D are correct.
long and int can't be used with floating point numbers so option A is incorrect.
Option E is incorrect as it have smaller range and also can't be used with floating point
numbers. hnpsy/docs.oracle.com/javase/tutorial/java/javaOO/variables.html


NEW QUESTION # 115
Which two are benefits of polymorphism?

  • A. More dynamic code at runtime
  • B. More flexible and reusable code
  • C. More efficient code at runtime
  • D. Code that is protected from extension by other classes
  • E. Faster code at runtime

Answer: A,B


NEW QUESTION # 116
Given: What is the result?

  • A. A NullPointerException is thrown at runtime
  • B. True null
  • C. Compilation fails
  • D. True false

Answer: B


NEW QUESTION # 117
Which three statements are true about the structure of a Java class?

  • A. A class can have overloaded static methods.
  • B. The fields need not be initialized before use.
  • C. A public class must have a main method.
  • D. A class can have only one private constructor.
  • E. A method can have the same name as a field.
  • F. The methods are mandatory components of a class.

Answer: B,D,E


NEW QUESTION # 118
Given:

What is the result?

  • A. myStr: 7007, myNum: 7007
  • B. Compilation fails
  • C. myStr: 9009, myNum: 9009
  • D. myStr: 7007, myNum: 9009

Answer: D


NEW QUESTION # 119
Given: And the commands: Javac Test.java Java Test 12345

What is the result?

  • A. A NullPointerException is thrown at runtime
  • B. AnArrayIndexOutOfBoundException is thrown at runtime.
  • C. A NumberFormatException is thrown at runtime
  • D. Number us : 12345

Answer: D


NEW QUESTION # 120
Given the code from the Greeting.Java file:

Which set of commands prints Hello Duke in the console?

  • A. Option D
  • B. Option B
  • C. Option C
  • D. Option A

Answer: C


NEW QUESTION # 121
Given the code fragment:

Which three lines fail to compile?

  • A. Line 7
  • B. Line 11
  • C. Line 9
  • D. Line 10
  • E. Line 12
  • F. Line 8

Answer: D


NEW QUESTION # 122
Given:

What is the result?

  • A. true, false
  • B. false, false
  • C. false, true
  • D. true, true

Answer: C


NEW QUESTION # 123
Given the code fragment:

Which modification enables the code fragment to print TrueDone?

  • A. Remove the default section.
  • B. Replace line 5 with boolean opt = l;
    Replace line 7 with case 1:
  • C. Replace line 5 With String opt = "true";
    Replace line 7 with case "true":
  • D. At line 9, remove the break statement.

Answer: C


NEW QUESTION # 124
Given:

What is the result?

  • A. An exception is thrown at runtime.
  • B. Compilation fails.
  • C. Initialized
    Started
    Initialized
  • D. Initialized
    Started

Answer: B


NEW QUESTION # 125
Given the code fragment:

What is the result?

  • A. 1 3followed by an ArrayIndexOutOfBoundsException
  • B. 1 31 3 0 0
  • C. 1 3 5 71 3
  • D. 1 31 3
  • E. Compilation fails.

Answer: D

Explanation:


NEW QUESTION # 126
Given the code fragment from three files: Which code fragment, when inserted at line 2, enables the code to compile?

  • A. Option D
  • B. Option B
  • C. Option C
  • D. Option E
  • E. Option A

Answer: D


NEW QUESTION # 127
Given the code fragment:

What is the result?

  • A. 2012-01-30
  • B. 2012-02-10
  • C. A DateTimeException is thrown at runtime.
  • D. 2012-02-10 00:00

Answer: A


NEW QUESTION # 128
Given the following two classes:

How should you write methods in the ElectricAccount class at line n1 so that the member variable bill is always equal to the value of the member variable kwh multiplied by the member variable rate?
Any amount of electricity used by a customer (represented by an instance of the customer class) must contribute to the customer's bill (represented by the member variable bill) through the method use Electricity method. An instance of the customer class should never be able to tamper with or decrease the value of the member variable bill.

  • A.
  • B.
  • C.
  • D.

Answer: A


NEW QUESTION # 129
......

Most Reliable Oracle 1z1-808 Training Materials: https://www.realvce.com/1z1-808_free-dumps.html

Practice Material for 1z1-808 Exam Question Preparation: https://drive.google.com/open?id=1MQZshCOr9zvLNFLozjaIVvciea0U9Sde