New Year Special Sale Limited Time 70% Discount Offer - Ends in 0d 00h 00m 00s - Coupon code: scxmas70

1z0-811 Exam Dumps - Java Foundations

Go to page:
Question # 9

Given the code fragment:

Which two code fragments are valid at line 2?

A.

for (int count = 0; count < 5; count++) {

System.out.print(count);

}

B.

package p1;

C.

import java.util.*;

public void display() {

List nums = new ArrayList<> ();

}

D.

{

private int num;

}

E.

private String name = “John”;

public void display() {

System.out.print(name);

}

Full Access
Question # 10

Given the code fragment:

What is the result?

A.

false

false

B.

true

true

C.

true

false

D.

false

true

Full Access
Question # 11

Given the code fragment:

What is the result?

A.

456789

B.

4567889

C.

45678

D.

3456789

Full Access
Go to page: