Free Oracle 1z0-811 Exam Braindumps (page: 2)

Which statement is true about primitive variables?

  1. They can be compared with the == operator.
  2. They can be compared with the equals method only.
  3. They cannot be compared.
  4. They can be compared with the compareTo method only.

Answer(s): B


Reference:

https://stackoverflow.com/questions/9690981/compare-two-primitive-long-variables-in-java



Given the code fragment:



What is the result?

  1. 2
  2. 4
  3. The program executes an infinite number of times.
  4. 3

Answer(s): B

Explanation:



Identify two Java reserved words.

  1. array
  2. true
  3. this
  4. exception
  5. string

Answer(s): B,C


Reference:

https://www.computerhope.com/jargon/j/java_reserved_words.htm



Which statement is true about a Java method?

  1. It must be declared with an access modifier.
  2. It cannot be defined within another method.
  3. It must accept a parameter and return a value.
  4. It cannot be defined as static final.

Answer(s): B


Reference:

https://www.quora.com/Can-we-define-a-function-within-another-function-in-Java






Post your Comments and Discuss Oracle 1z0-811 exam prep with other Community members:

1z0-811 Exam Discussions & Posts