Pass the Oracle Java SE 1z0-829 Questions and answers with CertsForce

Viewing page 1 out of 2 pages
Viewing questions 1-10 out of questions
Questions # 1:

Given the directory structure:

Question # 1

Given the definition of the Doc class:

Question # 1

Which two are valid definition of the wordDoc class?

Options:

A.

Package p1;

Public non-sealed class wordDoc extends Doc ()


B.

Package p1;

Public class wordDoc extends Doc ()


C.

Package p1, p2;

Public non-sealed class WordDoc extends Doc ()


D.

Package p1, p2;

Public sealed class WordDoc extends Doc ()


E.

Package p1,

non-sealed abstract class WordDoc extends Doc ()


F.

Package p1;

Public final class WordDoc extends Doc ()


Questions # 2:

Given:

Question # 2

What is the result?

Options:

A.

Tablechair Tablechair


B.

Wtablechair tableChair


C.

A RuntimeException is thrown


D.

wTableChair TableChair


E.

Compilation fails


Questions # 3:

Given the content of the in. tart file:

23456789

and the code fragment:

Question # 3

What is the content of the out .txt file?

Options:

A.

01234567801234


B.

012345678


C.

0123456789234567


D.

0123456789


E.

012345678901234


F.

01234567


Questions # 4:

Given the code fragment:

Question # 4

Which two statements at Line nl independently enable you to print 1250?

Options:

A.

Integer res = 250 + integer.parseint (s)


B.

Integer res = 250 + s:


C.

Integer res = 250 + integer (s2):


D.

Integer res= 250 + s2;


E.

Integer res = 250 + integer . valueof (s);


F.

Integer res = 250;

Res = + s2;


Questions # 5:

Given:

Question # 5

What is the result?

Options:

A.

1 RAINY


B.

Compilation fails


C.

1 Snowy


D.

0 CLOUDY


E.

0 Snowy


Questions # 6:

Which two code fragments compile?

A)

Question # 6

B)

Question # 6

C)

Question # 6

D)

Question # 6

E)

Question # 6

Options:

A.

Option A


B.

Option B


C.

Option C


D.

Option D


E.

Option E


Questions # 7:

Which statement is true?

Options:

A.

IllegalStateException is thrown if a thread in waiting state is moved back to runnable.


B.

thread in waiting state consumes CPU cycles.


C.

A thread in waiting state must handle InterrupedException.


D.

After the timed wait expires, the waited thread moves to the terminated state.


Questions # 8:

Given the code fragment:

Question # 8

What is the result?

Options:

A.

False true true optional (Newyear)


B.

0110


C.

True true false NewYear


D.

010 optional (Newyear)


Questions # 9:

Given the code fragments:

Question # 9

Which is true?

Options:

A.

The program prints t1 : 1: t2 : 1: t1 : t2 : 2 : in random order.


B.

The program prints t1 : 1 : t2: 1 : t1 : 2 : t2: 2:


C.

The program prints t1 : 1: t2 : 1: t1 : 1 : t2 : 1 : indefinitely


D.

The program prints an exception


Questions # 10:

Given:

Question # 10

Which statement is true while the program prints GC?

Options:

A.

Only the object referenced by t2 is eligible for garbage collection.


B.

Both the objects previously referenced by t1 are eligible for garbage collection.


C.

None of the objects are eligible for garbage collection.


D.

Only one of the objects previously referenced by t1 is eligible for garbage collection.


Viewing page 1 out of 2 pages
Viewing questions 1-10 out of questions