0% found this document useful (0 votes)
117 views7 pages

Oracle Dumps PDF

The document contains sample questions and answers for the Oracle 1Z0-811 Java Foundations certification exam. It includes 6 multiple choice questions about Java concepts like primitive variables, mutator methods, and variable scope. The questions test understanding of Java fundamentals.

Uploaded by

lucyemelda88
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
117 views7 pages

Oracle Dumps PDF

The document contains sample questions and answers for the Oracle 1Z0-811 Java Foundations certification exam. It includes 6 multiple choice questions about Java concepts like primitive variables, mutator methods, and variable scope. The questions test understanding of Java fundamentals.

Uploaded by

lucyemelda88
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 7

Oracle

F
1Z0-811

PD
Java Foundations

QUESTION & ANSWERS PS


M
U

Demo Version
D
LE
AC
R
O

https://www.oracledumpspdf.com/1Z0-811-exam-questions.html
QUESTION 1

Which statement is true about primitive variables?


A. They can be compared with the == operator.
B. They can be compared with the equals method only.
C. They cannot be compared.
D. They can be compared with the compareTo method only.

Correct Answer: B

F
PD
Explanation/Reference:

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

PS
QUESTION 2
M
Given the code fragment:
U
D
LE
AC

Which code fragment can be inserted at line n1 to enable the code to print 0.0?
A. Ball b = null;b.weight = 0.0;
B. Ball.weight = 0.0;
R

C. Ball b = new Ball(0.0);


D. Ball b = new Ball();
O

Correct Answer: D

Explanation/Reference:

https://www.oracledumpspdf.com/1Z0-811-exam-questions.html
QUESTION 3

Given the code fragment:

Which statement is true?

F
A. A compilation error occurs at line 5.

PD
B. A compilation error occurs at line 3.
C. The code compiles without errors.
D. A compilation error occurs at line 7.

Correct Answer: C
PS
M
U

Explanation/Reference:
D
LE
AC
R
O

https://www.oracledumpspdf.com/1Z0-811-exam-questions.html
F
PD
PS
M
U
D
LE

QUESTION 4
AC

Which statement is true about a mutator method?


A. It replaces the default constructor.
B. It returns mutated instance members.
C. It must be declared private.
R

D. It can be used to assign data to instance members.


O

Correct Answer: B

Explanation/Reference:

Reference:
https://core.ac.uk/download/pdf/4824892.pdf

https://www.oracledumpspdf.com/1Z0-811-exam-questions.html
QUESTION 5

Given:

What is the result?

F
A. The program compiles and nothing is printed.

PD
B. Iteration plus an increasing number is printed 100 times.
C. Iteration plus an increasing number is printed 99 times.
D. An error occurs during compilation.

Correct Answer: D
PS
M
U

QUESTION 6
D

Given:
LE
AC
R

What is the result?


O

A. Compilation fails. To make it compile, replace line n1 with var1 = 0;


B. Compilation fails. To make it compile, replace line n2 with var2 = 0;
C. 0
D. Nothing is printed.

Correct Answer: B

https://www.oracledumpspdf.com/1Z0-811-exam-questions.html
Explanation/Reference:

F
PD
PS
M
U
D
LE
AC
R
O

https://www.oracledumpspdf.com/1Z0-811-exam-questions.html
F
PD
PS
M
U
D
LE
AC
R
O

https://www.oracledumpspdf.com/1Z0-811-exam-questions.html

You might also like