oracle 1z0-819 practice test

Exam Title: Java SE 11 Developer

Last update: Dec 07 ,2025
Question 1

Given:

What is the result?

  • A. 5
  • B. 3
  • C. 23
  • D. 25
  • E. 11
Answer:

E

vote your answer:
A
B
C
D
E
A 0 B 0 C 0 D 0 E 0
Comments
Question 2

Given:


What is the result?
A. 2,34,34,5
B. 2,34,54,5
C. 2,54,54,5
D. 2,34,54,3

Answer:

C

Comments
Question 3

Given:

What is the result?

  • A. It throws a runtime exception.
  • B. Value of Euler = 2.71828
  • C. The code does not compile.
  • D. Value of Euler = “2.71828”
Answer:

C

vote your answer:
A
B
C
D
A 0 B 0 C 0 D 0
Comments
Question 4

Given:

executed using this command:
java Myclass My Car is red
What is the output of this class?

  • A. Car--red--My
  • B. My--Car--is
  • C. My--is--java
  • D. java--Myclass--My
  • E. Myclass--Car--red
Answer:

A

vote your answer:
A
B
C
D
E
A 0 B 0 C 0 D 0 E 0
Comments
Question 5

Given:

Which two allow a.Main to allocate a new Person? (Choose two.)

  • A. In Line 1, change the access modifier to privateprivate Person() {
  • B. In Line 1, change the access modifier to publicpublic Person() {
  • C. In Line 2, add extends Person to the Main classpublic class Main extends Person {and change Line 3 to create a new Main objectPerson person = new Main();
  • D. In Line 2, change the access modifier to protectedprotected class Main {
  • E. In Line 1, remove the access modifierPerson() {
Answer:

BC

vote your answer:
A
B
C
D
E
A 0 B 0 C 0 D 0 E 0
Comments
Question 6

Given:


Which loop incurs a compile time error?

  • A. the loop starting line 11
  • B. the loop starting line 7
  • C. the loop starting line 14
  • D. the loop starting line 3
Answer:

C

vote your answer:
A
B
C
D
A 0 B 0 C 0 D 0
Comments
Question 7

Which two statements are true about Java modules? (Choose two.)

  • A. Modular jars loaded from --module-path are automatic modules.
  • B. Any named module can directly access all classes in an automatic module.
  • C. Classes found in –classpath are part of an unnamed module.
  • D. Modular jars loaded from –classpath are automatic modules.
  • E. If a package is defined in both the named module and the unnamed module, then the package in the unnamed module is ignored.
Answer:

A,C


Reference: http://tutorials.jenkov.com/java/modules.html

vote your answer:
A
B
C
D
E
A 0 B 0 C 0 D 0 E 0
Comments
Question 8

Given:


Which two lines of code when inserted in line 1 correctly modifies instance variables? (Choose two.)

  • A. setCCount(c) = cCount;
  • B. tCount = tCount;
  • C. setGCount(g);
  • D. cCount = setCCount(c);
  • E. aCount = a;
Answer:

B,E

vote your answer:
A
B
C
D
E
A 0 B 0 C 0 D 0 E 0
Comments
Question 9

Given:


What is the expected result of javac?

  • A. javac fails to compile the class and prints the error message, C:\workspace4\Mycar.java:1:error: package java does not exist
  • B. javac compiles Mycar.java without errors or warnings.
  • C. javac fails to compile the class and prints the error message, C:\workspace4\Mycar.java:1:error: expected import java.lang
  • D. javac fails to compile the class and prints the error message, Error: Could not find or load main class Mycar.class
Answer:

B

vote your answer:
A
B
C
D
A 0 B 0 C 0 D 0
Comments
Question 10

Given:

Which is true?

  • A. The compilation fails due to an error in line 6.
  • B. The compilation succeeds.
  • C. The compilation fails due to an error in line 4.
  • D. The compilation fails due to an error in line 10.
  • E. The compilation fails due to an error in line 7.
  • F. The compilation fails due to an error in line 9.
  • G. The compilation fails due to an error in line 2.
Answer:

A

vote your answer:
A
B
C
D
E
F
G
A 0 B 0 C 0 D 0 E 0 F 0 G 0
Comments
Page 1 out of 21
Viewing questions 1-10 out of 214
Go To
page 2