Labour Day Special 65% Discount Offer - Ends in 0d 00h 00m 00s - Coupon code: exams65

Java Foundations Question and Answers

Java Foundations

Last Update May 6, 2024
Total Questions : 75

We are offering FREE 1z0-811 Oracle exam questions. All you do is to just go and sign up. Give your details, prepare 1z0-811 free exam questions and then go for complete pool of Java Foundations test questions that will help you more.

1z0-811 pdf

1z0-811 PDF

$35  $99.99
1z0-811 Engine

1z0-811 Testing Engine

$42  $119.99
1z0-811 PDF + Engine

1z0-811 PDF + Testing Engine

$56  $159.99
Questions 1

Which statement is true about a mutator method?

Options:

A.  

It replaces the default constructor.

B.  

It returns mutated instance members.

C.  

It must be declared private.

D.  

It can be used to assign data to instance members.

Discussion 0
Questions 2

Given the code fragment:

At which line does a compilation error occur?

Options:

A.  

lines 5 and 7

B.  

line 7

C.  

lines 6 and 8

D.  

line 5

Discussion 0
Questions 3

Which two statements are true about the Java Runtime Environment (JRE)?

Options:

A.  

It is responsible for garbage collection.

B.  

It interprets bytecode stored in a .class file.

C.  

It contains the JDK and Java APIs.

D.  

It is platform independent.

E.  

You must install the JRE to compile a .java file.

Discussion 0
Questions 4

Identify three features of the Java programming language.

Options:

A.  

distributed

B.  

direct memory management

C.  

multithreaded

D.  

strongly typed

E.  

dynamically typed

Discussion 0
Questions 5

Given the code fragment:

What is the result?

Options:

A.  

2

B.  

4

C.  

The program executes an infinite number of times.

D.  

3

Discussion 0
Questions 6

Given the code fragment:

What is the result?

Options:

A.  

[ BETATEST ]

B.  

[betaTest]

C.  

[ betaTest ]

D.  

[BETATEST]

Discussion 0
Questions 7

Which two components can class declarations include?

Options:

A.  

A list of instance methods

B.  

The main method

C.  

Interfaces implemented by the class

D.  

The public modifier

Discussion 0
Questions 8

Which statement is true about a Java method?

Options:

A.  

It must be declared with an access modifier.

B.  

It cannot be defined within another method.

C.  

It must accept a parameter and return a value.

D.  

It cannot be defined as static final.

Discussion 0
Questions 9

Given the code fragment:

What is the result?

Options:

A.  

10 20

10 15 20

B.  

A runtime exception is thrown.

C.  

10 20

10 20

D.  

A compilation error occurs.

Discussion 0
Questions 10

Given the code fragment:

What is the result?

Options:

A.  

10

B.  

11

C.  

12

D.  

13

Discussion 0
Questions 11

Given:

What is the result?

Options:

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.

Discussion 0