Ensurepass

 

QUESTION 11

Given the code fragment:

 

clip_image001

 

What is the result?

 

A.

Values are : [EE, ME]

B.

Values are : [EE, EE, ME]

C.

Values are : [EE, ME, EE]

D.

Values are : [SE, EE, ME, EE]

E.

Values are : [EE, ME, SE, EE]

 

Correct Answer: E

 

 

QUESTION 12

Given the code fragment:

 

clip_image003

 

What is the result if the integer aVar is 9?

 

A.

10 Hello world!

B.

10 Hello universe!

C.

9 Hello world!

D.

Compilation fails.

 

Correct Answer: A

 

 

QUESTION 13

Given:

 

clip_image005

 

A.

ns = 50 S = 125

ns = 125 S = 125

ns = 100 S = 125

B.

ns = 50 S = 125

ns = 125 S = 125

ns = 0 S = 125

C.

ns = 50 S = 50

ns = 125 S = 125

ns = 100 S = 100

D.

ns = 50 S = 50

ns = 125 S = 125

ns = 0 S = 125

 

Correct Answer: B

 

QUESTION 14

Given the code fragment

 

clip_image007

 

Which code fragments, inserted independently, enable the code compile?

 

A.

t.fvar = 200;

B.

cvar = 400;

C.

fvar = 200;

cvar = 400;

D.

this.fvar = 200;

this.cvar = 400;

E.

t.fvar = 200;

Test2.cvar = 400;

F.

th
is.fvar = 200;

Test2.cvar = 400;

 

Correct Answer: B

 

 

QUESTION 15

Given the code fragment:

 

clip_image009

 

What is the result?

 

A.

28false29

true

B.

285 < 429

true

C.

true

true

D.

compilation fails

 

Correct Answer: C

 

 

 

 

 

 

 

QUESTION 16

View the exhibit:

 

clip_image011

clip_image013

 

What is the result when this program is
executed?

 

A.

Bob’s Name: Bob

B.

Bob’s Name: Jian

C.

Nothing prints

D.

Bob’s name

 

Correct Answer: B

Explanation:

After the statement jian = bob; the jian will reference the same object as bob.

 

 

QUESTION 17

What is the proper way to defined a method that take two int values and returns their sum as an int value?

 

A.

int sum(int first, int second) { first + second; }

B.

int sum(int first, second) {return first + second; }

C.

sum(int first, int second) { return first + second; }

D.

int sum(int first, int second) { return first + second; }

E.

void sum (int first, int second) { return first + second; }

 

Correct Answer: D

QUESTION 18

Given:

 

clip_image014

 

What is the result?

 

A.

1

B.

1

C.

2

D.

Compilation fails

E.

The loop executes infinite times

 

Correct Answer: E

 

 

QUESTION 19

Given:

 

clip_image016

 

What is the result?

 

A.

7

B.

12

C.

19

D.

Compilation fails

E.

An exception is thrown at run time

 

Correct Answer: B

 

QUESTION 20

Given:

 

public class Test1 {

 

static void doubling (Integer ref, int pv) {

 

ref =20;

 

pv = 20;

 

}

 

public static void main(String[] args) {

 

Integer iObj= new Integer(10);

 

int iVar = 10;

 

doubling(iObj++, iVar++);

 

System.out.println(iObj+ “, “+iVar);

 

What is the result?

 

A.

11, 11

B.

10, 10

C.

21, 11

D.

20, 20

E.

11, 12

 

Correct Answer: A

Explanation:

The code doubling(iObj++, iVar++); increases both variables from to 10 to 11.

Free VCE & PDF File for Oracle 1Z0-803 Real Exam

Instant Access to Free VCE Files: CompTIA | VMware | SAP …
Instant Access to Free PDF Files: CompTIA | VMware | SAP …

Comments are closed.