oracle 1z0-819 practice test

Java SE 11 Developer Exam

Last exam update: May 08 ,2024
Page 1 out of 15. Viewing questions 1-15 out of 214

Question 1

Given the code fragment:

Which code fragment replaces the for statement?
A. IntStream.rangeClosed(l, 100).map(FizzBuzz::convert).forEach(System.out::println);
B. IntStream.ranged, 100).map(FizzBuzz::convert).forEach(System.out::println);
C. intstream.rangeclosed(l, 100).mapToObj{FizzBuzz::convert).forEach(System.out::printIn);
D. IntStream.range(1, 100).mapToObj(FizzBuzz::convert).forEach(System.out::println);

Mark Question:
Answer:

A

Discussions
0 / 1000

Question 2

Given:

Which two codes, independently, can be inserted in line to 1 compile?

  • A. Abacus aba = (int m, int n) -> { m * n };
  • B. Abacus aba = (int e, int f) -> { return e * f; };
  • C. Abacus aba = (a, b) -> a * b;
  • D. Abacus aba = v, w -> x * y;
  • E. Abacus aba = (int i, j) -> ( return i * j; };
Mark Question:
Answer:

CE

User Votes:
A
50%
B
50%
C
50%
D
50%
E
50%
Discussions
vote your answer:
A
B
C
D
E
0 / 1000

Question 3

Given:

What is the output?

  • A. A compilation error is thrown.
  • B. Message from Copier: Attempt00
  • C. Message from Abstract Copier: Attempt00
  • D. A runtime error is thrown.
Mark Question:
Answer:

A

User Votes:
A
50%
B
50%
C
50%
D
50%
Discussions
vote your answer:
A
B
C
D
0 / 1000

Question 4

Given the code fragment:
Which two code snippets inserted independently inside print method print Mondial: domainmodal?

  • A. prefix + name
  • B. prefix + getName
  • C. new Main (} .prefix + new Main().name
  • D. prefix + Main, name
  • E. Main.prefix + Main.name
  • F. Main.prefix + Main.getName()
Mark Question:
Answer:

CD

User Votes:
A
50%
B
50%
C
50%
D
50%
E
50%
F
50%
Discussions
vote your answer:
A
B
C
D
E
F
0 / 1000

Question 5

Your organization makes mlib.jar available to your cloud customers. While working on a code cleanup
project for mlib.jar, you see this method by customers:

What security measures should be added to this method so that it meets the requirements for a
customer accessible method?
A.

B. Create a method that validates the hostName and portNumber parameters before opening the
socket.
C. Make enableService private.
D. Enclose the call to new Socket In an AccessController.doPrivileged block.

Mark Question:
Answer:

D

User Votes:
Discussions
vote your answer:
0 / 1000

Question 6

Given the code fragment:

Which can replace line 11?

  • A. UnaryOperator<Interger > uo = (var x ) -> (x * 3);
  • B. UnaryOperator<Interger >uo = var x -> { return x 3 ; };
  • C. UnaryOperator<Interger >uo = x -> { return x * 3; };
  • D. UnaryOperator<Interger >uo = (int x) -> x * 3;
Mark Question:
Answer:

A

User Votes:
A
50%
B
50%
C
50%
D
50%
Discussions
vote your answer:
A
B
C
D
0 / 1000

Question 7

Given the code fragment:

You want to examine whether path is a directory.
Which code inserted on line 1 will accomplish this?
A. BasicFileAttributes attributes = Files isDirectory (path);
B. BasicFileAttributes attributes =Files.getAttribute (path, insdirectory);
C. BasicFileAttributes attributes = Files.readAttributes(path, BasicFileAttributes.class
D. BasicFileAttributes attributes = Files, readAttributes (path, FileAttributes, class);

Mark Question:
Answer:

D

Discussions
0 / 1000

Question 8

Given the code fragment:

What change on line 1 will make this code compile?

  • A. Add catch (L |N e).
  • B. Add catch (L |M N e).
  • C. Add catch (L e).
  • D. Add catch (N | L | M e).
  • E. Add catch (M |L e).
Mark Question:
Answer:

C

User Votes:
A
50%
B
50%
C
50%
D
50%
E
50%
Discussions
vote your answer:
A
B
C
D
E
0 / 1000

Question 9

Given the code fragment:

What is the result?

  • A. An ArrayIndexOutofBoundsException is thrown at runtime.
  • B. The compilation fails.
  • C. gh ij kl
  • D. gj hk il
  • E. ghi jkl
Mark Question:
Answer:

A

User Votes:
A
50%
B
50%
C
50%
D
50%
E
50%
Discussions
vote your answer:
A
B
C
D
E
0 / 1000

Question 10


And the code fragment:

Which situation will occur on code fragment execution?

  • A. Livelock
  • B. Deadlock
  • C. Race Condition
  • D. Starvation
Mark Question:
Answer:

D

User Votes:
A
50%
B
50%
C
50%
D
50%
Discussions
vote your answer:
A
B
C
D
0 / 1000

Question 11

Given:

Which three classes successfully override showFirst ()?
A)

B)

C)

D)

E)

F)

  • A. Option A
  • B. Option B
  • C. Option C
  • D. Option D
  • E. Option E
  • F. Option F
Mark Question:
Answer:

C

User Votes:
A
50%
B
50%
C
50%
D
50%
E
50%
F
50%
Discussions
vote your answer:
A
B
C
D
E
F
0 / 1000

Question 12

Given:

A) An exception is thrown at run time.
B)

C) The compilation fails due to an error on line 2.
D) The compilation fails due to an error on line 1.
E)

F)
The compilation fails due to an error on line 3.

  • A. Option A
  • B. Option B
  • C. Option C
  • D. Option D
  • E. Option E
  • F. Option F
Mark Question:
Answer:

A

User Votes:
A
50%
B
50%
C
50%
D
50%
E
50%
F
50%
Discussions
vote your answer:
A
B
C
D
E
F
0 / 1000

Question 13

Given the code fragment:

Which two statement inserted independently at line 1 enable this code to print PRRT?

  • A. i—;
  • B. continue b;
  • C. break b;
  • D. j--;
  • E. continue a;
  • F. break a ;
Mark Question:
Answer:

F

User Votes:
A
50%
B
50%
C
50%
D
50%
E
50%
F
50%
Discussions
vote your answer:
A
B
C
D
E
F
0 / 1000

Question 14

Given:

What is the result?

  • A. Keys: 4 Values: 4 Map: 0
  • B. Keys: 4 Values: 4 Map: 4
  • C. The compilation fails.
  • D. Keys: 0 Values: 0 Map:
  • E. Keys: 0 Values: 0 Map: 0
Mark Question:
Answer:

B

User Votes:
A
50%
B
50%
C
50%
D
50%
E
50%
Discussions
vote your answer:
A
B
C
D
E
0 / 1000

Question 15

Given the code fragment:

What is the result?
A)

B)

C)

D)

  • A. Option A
  • B. Option B
  • C. Option C
  • D. Option D
Mark Question:
Answer:

C

User Votes:
A
50%
B
50%
C
50%
D
50%
Discussions
vote your answer:
A
B
C
D
0 / 1000
To page 2