Weekend Sale - Limited Time 70% Discount Offer - Ends in 0d 00h 00m 00s - Coupon code: sntaclus

Given the code fragment:

What is the output?

A.

8

B.

3

C.

0

D.

A compilation error occurs.

Given:

And the code fragment:

What is the result?

A.

A compilation error occurs at line n1.

B.

White : null

C.

null: null

D.

White : White

Given the code fragment:

What is the result?

A.

pen pencil erasers paper

B.

paper pen pencil erasers

C.

A compilation error occurs.

D.

A runtime exception is thrown.

Given:

At which line does a compilation error occur?

A.

line 5

B.

line 2

C.

line 3

D.

line 7

Given the contents of the Test.java file:

What is the result?

A.

200 : 400

B.

A compilation error occurs at line n1.

C.

A compilation error occurs at line n2.

D.

100 : 400

Given the code fragment:

What is the result?

A.

a memory address1 in hexadecimal number format

a memory address2 in hexadecimal number format

B.

10, 15

[10, 15]

C.

0, 10, 15

[10, 15, null]

D.

a memory address in hexadecimal number format

[10, 15]

Given the code:

Which code fragment, when inserted at line n1, enables the code to print sum is 30?

A.

int sum(int a, b) {

B.

int sum(int a, int b) {

C.

int sum(int, int) {

D.

int sum(int[] a, b) {

Given:

What is the result?

A.

A compilation error occurs in the modify method.

B.

99

C.

5

D.

A compilation error occurs in the main method.

Given the code fragment:

What is the result?

A.

false

true

B.

true

true

C.

false

false

D.

A runtime exception is thrown

Which package would you import to use the Random class?

A.

java.io

B.

java.math

C.

java.util

D.

java.lang