Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                

Oracle: Question & Answers

Download as pdf or txt
Download as pdf or txt
You are on page 1of 7

Oracle

1Z0-811
Java Foundations
QUESTION & ANSWERS

https://www.oracledumpsfree.com/1Z0-811-exam-dumps.html
QUESTION: 1

Which statement is true about a Java method?

Option A : It must be declared with an access modifier.

Option B : It cannot be defined within another method.

Option C : It must accept a parameter and return a value.

Option D : It cannot be defined as static final.

Correct Answer: B

Explanation/Reference:

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

QUESTION: 2

Identify two features of Java.

Option A : architecture dependent

Option B : platform independent

Option C : single threaded

Option D : robust

Correct Answer: B,D

Explanation/Reference:

Reference:https://www.javatpoint.com/features-of-java

QUESTION: 3

https://www.oracledumpsfree.com/1Z0-811-exam-dumps.html
Given the code:
Which code fragment, when inserted at line n1, enables the code to print sum is 30?

Option A : int sum(int a, b) {

Option B : int sum(int a, int b) {

Option C : int sum(int, int) {

Option D : int sum(int[] a, b) {

Correct Answer: D

QUESTION: 4

You have a microprocessor board, such as Raspberry PI, wired to control a drone.Which edition of Java is
geared towards use of simple, closed systems with constrained memoryrequirements, such as a
microprocessor board?

Option A : Java Micro Edition

Option B : Java Standard Edition with a Compact Profile

Option C : Java Enterprise Edition

Option D : Java SE Embedded

Correct Answer: D

Explanation/Reference:

Reference:https://www.oracle.com/technical-resources/articles/java/raspberrypi.html

https://www.oracledumpsfree.com/1Z0-811-exam-dumps.html
QUESTION: 5

Given:
Which statement, when inserted at line n1, enables the Course class to compile?

Option A : int newFee;

Option B : double newFee;

Option C : long newFee;

Option D : float newFee;

Correct Answer: B

QUESTION: 6

Given the code


What is the result?

Option A : The program executes indefinitely.

Option B : num = 100

Option C : num = 99

Option D : num = 0

Correct Answer: C

https://www.oracledumpsfree.com/1Z0-811-exam-dumps.html
Explanation/Reference:

QUESTION: 7

Given:
What is the result?

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

Option B : Compilation fails. To make it compile, replace line n2 with var2 = 0;

Option C : 0

https://www.oracledumpsfree.com/1Z0-811-exam-dumps.html
Option D : Nothing is printed.

Correct Answer: B

Explanation/Reference:

QUESTION: 8

Given the code fragment:


What is the output?

Option A : 8

Option B : 3

Option C : 0

Option D : A compilation error occurs.

https://www.oracledumpsfree.com/1Z0-811-exam-dumps.html
Correct Answer: C

Explanation/Reference:

https://www.oracledumpsfree.com/1Z0-811-exam-dumps.html

You might also like