1z0-819_3
1z0-819_3
1z0-819_3
Oracle
Exam Questions 1Z0-819
Java SE 11 Developer
NEW QUESTION 1
Given:
Answer: BC
NEW QUESTION 2
Which two commands are used to identify class and module dependencies? (Choose two.)
A. jmod describe
B. java Hello.java
C. jdeps --list-deps
D. jar --show-module-resolution
E. java --show-module-resolution
Answer: CE
NEW QUESTION 3
Which two statements are true about the modular JDK? (Choose two.)
A. The foundational APIs of the Java SE Platform are found in the java.base module.
B. An application must be structured as modules in order to run on the modular JDK.
C. It is possible but undesirable to configure modules’ exports from the command line.
D. APIs are deprecated more aggressively because the JDK has been modularized.
Answer: AC
NEW QUESTION 4
Given:
A. Orange Juice
B. The compilation fails.
C. Orange Juice Apple Pie Lemmon Ice Raspberry Tart
D. The program prints nothing.
Answer: C
Explanation:
NEW QUESTION 5
Given:
Answer: C
NEW QUESTION 6
Given the code fragment:
Path currentFile = Paths.get(“/scratch/exam/temp.txt”); Path outputFile = Paths get(“/scratch/exam/new.txt”); Path directory = Paths.get(“/scratch/”);
Files.copy(currentFile, outputFile); Files.copy(outputFile, directory);
Files.delete (outputFile);
The /scratch/exam/temp.txt file exists. The /scratch/exam/new.txt and /scratch/new.txt files do not exist. What is the result?
Answer: C
Explanation:
NEW QUESTION 7
Given:
Which is true?
Answer: A
NEW QUESTION 8
Given:
A. null
B. nothing
C. It fails to compile.
D. java.lang.IllegalAccessException is thrown.
E. Student
Answer: C
NEW QUESTION 9
Given:
A. 6910 3
B. 10126 3
C. 3
D. 6104 3
Answer: D
Explanation:
NEW QUESTION 10
Given:
A. Insert Comparator<Person> on line 1.Insertpublic int compare(Person p1, Person p2) { return p1.name.compare(p2.name);}on line 2.
B. Insert Comparator<Person> on line 1.Insertpublic int compareTo(Person person) { return person.name.compareTo(this.name);}on line 2.
C. Insert Comparable<Person> on line 1.Insertpublic int compare(Person p1, Person p2) { return p1.name.compare(p2.name);}on line 2.
D. Insert Comparator<Person> on line 1.Insertpublic int compare(Person person) { return person.name.compare(this.name);}on line 2.
Answer: B
NEW QUESTION 10
Which command line runs the main class com.acme.Main from the module com.example?
Answer: D
NEW QUESTION 11
Given:
A. javac fails to compile the class and prints the error message, C:\workspace4\Mycar.java:1:error: packagejava 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
NEW QUESTION 12
Given the formula to calculate a monthly mortgage payment:
Answer: A
NEW QUESTION 17
Given the code fragment:
var pool = Executors.newFixedThreadPool(5);
Future outcome = pool.submit(() > 1);
Which type of lambda expression is passed into submit()?
A. java.lang.Runnable
B. java.util.function.Predicate
C. java.util.function.Function
D. java.util.concurrent.Callable
Answer: D
NEW QUESTION 20
Given:
Which code, when inserted at one or more marked positions, would allow classes B and C to compile?
A. @Override // position 3void x () {} // position 3@Override // position 3public void z() { } // position 3
B. @Override // position 2public void z() { } // position 3
C. implements A // position 1@Override // position 2
D. public void z() { } // position 3
Answer: B
NEW QUESTION 21
Given:
Answer: D
Explanation:
NEW QUESTION 23
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
NEW QUESTION 28
Given:
A. 300
B. Exception
C. 200
D. 100
Answer: A
Explanation:
NEW QUESTION 30
Given:
A. 2134
B. 2143
C. 214
D. 234
Answer: C
Explanation:
NEW QUESTION 34
Given:
A. D
B. Who
C. D
D. Null
E. An exception is thrown at runtime.
F. null
Answer: D
Explanation:
NEW QUESTION 35
Given:
Which two lines can replace line 1 so that the Y class compiles? (Choose two.)
Answer: BD
NEW QUESTION 38
Given the code fragment:
Answer: D
Explanation:
NEW QUESTION 41
Given the code fragment:
A. ab cd ef
B. An ArrayIndexOutOfBoundsException is thrown at runtime.
C. The compilation fails.
D. abc def
E. ad be cf
Answer: E
NEW QUESTION 46
Given:
A. line 12
B. line 6
C. line 9
D. line 8
E. line 7
Answer: BE
NEW QUESTION 47
Given:
Answer: BD
Explanation:
NEW QUESTION 50
Examine these module declarations:
A. The ServiceProvider module is the only module that, at run time, can provide the com.example.api API.
B. The placement of the com.example.api API in a separate module, ServiceAPI, makes it easy to install multiple provider modules.
C. The Consumer module should require the ServiceProvider module.
D. The ServiceProvider module should export the com.myimpl package.
E. The ServiceProvider module does not know the identity of a module (such as Consumer) that uses the com.example.api API.
Answer: AC
NEW QUESTION 53
Given the code fragment:
A. 01
B. 1
C. The program prints nothing.
D. It prints 1 in the infinite loop.
Answer: D
NEW QUESTION 57
Which statement about a functional interface is true?
Answer: C
NEW QUESTION 61
Given:
String originalPath = “data\\projects\\a-project\\..\\..\\another-project”; Path path = Paths.get(originalPath); System.out.print(path.normalize());
What is the result?
A. data\another-project
B. data\projects\a-project\another-project
C. data\\projects\\a-project\\..\\..\\another-project
D. data\projects\a-project\..\..\another-project
Answer: D
Explanation:
NEW QUESTION 64
Given:
A. null
B. Joe Bloggs
C. The compilation fails due to an error in line 1.
D. p1
Answer: C
Explanation:
NEW QUESTION 66
Which two are successful examples of autoboxing? (Choose two.)
A. String a = “A”;
B. Integer e = 5;
C. Float g = Float.valueOf(null);
D. Double d = 4;
E. Long c = 23L;
F. Float f = 6.0;
Answer: AB
NEW QUESTION 71
Given:
Answer: D
Explanation:
NEW QUESTION 75
Given:
Answer: D
Explanation:
NEW QUESTION 76
Which two statements are true about Java modules? (Choose two.)
Answer: AC
NEW QUESTION 78
Given this requirement:
Module vehicle depends on module part and makes its com.vehicle package available for all other modules. Which module-info.java declaration meets the
requirement?
A. Option A
B. Option B
C. Option C
D. Option D
Answer: A
NEW QUESTION 80
Given:
Answer: C
Explanation:
NEW QUESTION 81
Which statement about access modifiers is correct?
Answer: B
NEW QUESTION 84
Analyze the code:
Which two options can you insert inside println method to produce Global:namescope? (Choose two.)
A. Test.prefix+Test.name
B. new Test().prefix+new Test().name
C. Test.prefix+Test.getName()
D. Test.getName+prefix
E. prefix+Test.name
F. prefix+name
Answer: BC
NEW QUESTION 87
Given:
and:
Which code, when inserted on line 10, prints the number of unique localities from the roster list?
A. .map(Employee::getLocality).distinct().count();
B. map(e > e.getLocality()).count();
C. .map(e > e.getLocality()).collect(Collectors.toSet()).count();
D. .filter(Employee::getLocality).distinct().count();
Answer: D
NEW QUESTION 89
Given:
Answer: D
Explanation:
NEW QUESTION 91
Given:
Answer: E
NEW QUESTION 95
Given:
A. 42
B. The compilation fails due to an error in line 4.
C. 17
D. The compilation fails due to an error in line 3.
E. The compilation fails due to an error in line 2.
F. The compilation fails due to an error in line 1.
G. The compilation fails due to an error in line 5.
Answer: A
A. java.logging
B. java.desktop
C. javafx
D. jdk.httpserver
E. jdk.jartool
Answer: AD
A. MessageBundle_en_US.properties
B. MessageBundle_en.properties
C. MessageBundle_fr_FR.properties
D. MessageBundle_US.properties
E. MessageBundle.properties
Answer: C
A. nothing
B. 10
C. 0 4 9
Answer: A
and
Answer: B
Explanation:
Answer: C
About Exambible
Found in 1998
Exambible is a company specialized on providing high quality IT exam practice study materials, especially Cisco CCNA, CCDA,
CCNP, CCIE, Checkpoint CCSE, CompTIA A+, Network+ certification practice exams and so on. We guarantee that the
candidates will not only pass any IT exam at the first attempt but also get profound understanding about the certificates they have
got. There are so many alike companies in this industry, however, Exambible has its unique advantages that other companies could
not achieve.
Our Advances
* 99.9% Uptime
All examinations will be up to date.
* 24/7 Quality Support
We will provide service round the clock.
* 100% Pass Rate
Our guarantee that you will pass the exam.
* Unique Gurantee
If you do not pass the exam at the first time, we will not only arrange FULL REFUND for you, but also provide you another
exam of your claim, ABSOLUTELY FREE!
NEW QUESTION 1
Given:
Answer: BC
NEW QUESTION 2
Which two commands are used to identify class and module dependencies? (Choose two.)
A. jmod describe
B. java Hello.java
C. jdeps --list-deps
D. jar --show-module-resolution
E. java --show-module-resolution
Answer: CE
NEW QUESTION 3
Which two statements are true about the modular JDK? (Choose two.)
A. The foundational APIs of the Java SE Platform are found in the java.base module.
B. An application must be structured as modules in order to run on the modular JDK.
C. It is possible but undesirable to configure modules’ exports from the command line.
D. APIs are deprecated more aggressively because the JDK has been modularized.
Answer: AC
NEW QUESTION 4
Given:
A. Orange Juice
B. The compilation fails.
C. Orange Juice Apple Pie Lemmon Ice Raspberry Tart
D. The program prints nothing.
Answer: C
Explanation:
NEW QUESTION 5
Given:
Answer: C
NEW QUESTION 6
Given the code fragment:
Path currentFile = Paths.get(“/scratch/exam/temp.txt”); Path outputFile = Paths get(“/scratch/exam/new.txt”); Path directory = Paths.get(“/scratch/”);
Files.copy(currentFile, outputFile); Files.copy(outputFile, directory);
Files.delete (outputFile);
The /scratch/exam/temp.txt file exists. The /scratch/exam/new.txt and /scratch/new.txt files do not exist. What is the result?
Answer: C
Explanation:
NEW QUESTION 7
Given:
Which is true?
Answer: A
NEW QUESTION 8
Given:
A. null
B. nothing
C. It fails to compile.
D. java.lang.IllegalAccessException is thrown.
E. Student
Answer: C
NEW QUESTION 9
Given:
A. 6910 3
B. 10126 3
C. 3
D. 6104 3
Answer: D
Explanation:
NEW QUESTION 10
Given:
A. Insert Comparator<Person> on line 1.Insertpublic int compare(Person p1, Person p2) { return p1.name.compare(p2.name);}on line 2.
B. Insert Comparator<Person> on line 1.Insertpublic int compareTo(Person person) { return person.name.compareTo(this.name);}on line 2.
C. Insert Comparable<Person> on line 1.Insertpublic int compare(Person p1, Person p2) { return p1.name.compare(p2.name);}on line 2.
D. Insert Comparator<Person> on line 1.Insertpublic int compare(Person person) { return person.name.compare(this.name);}on line 2.
Answer: B
NEW QUESTION 10
Which command line runs the main class com.acme.Main from the module com.example?
Answer: D
NEW QUESTION 11
Given:
A. javac fails to compile the class and prints the error message, C:\workspace4\Mycar.java:1:error: packagejava 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
NEW QUESTION 12
Given the formula to calculate a monthly mortgage payment:
Answer: A
NEW QUESTION 17
Given the code fragment:
var pool = Executors.newFixedThreadPool(5);
Future outcome = pool.submit(() > 1);
Which type of lambda expression is passed into submit()?
A. java.lang.Runnable
B. java.util.function.Predicate
C. java.util.function.Function
D. java.util.concurrent.Callable
Answer: D
NEW QUESTION 20
Given:
Which code, when inserted at one or more marked positions, would allow classes B and C to compile?
A. @Override // position 3void x () {} // position 3@Override // position 3public void z() { } // position 3
B. @Override // position 2public void z() { } // position 3
C. implements A // position 1@Override // position 2
D. public void z() { } // position 3
Answer: B
NEW QUESTION 21
Given:
Answer: D
Explanation:
NEW QUESTION 23
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
NEW QUESTION 28
Given:
A. 300
B. Exception
C. 200
D. 100
Answer: A
Explanation:
NEW QUESTION 30
Given:
A. 2134
B. 2143
C. 214
D. 234
Answer: C
Explanation:
NEW QUESTION 34
Given:
A. D
B. Who
C. D
D. Null
E. An exception is thrown at runtime.
F. null
Answer: D
Explanation:
NEW QUESTION 35
Given:
Which two lines can replace line 1 so that the Y class compiles? (Choose two.)
Answer: BD
NEW QUESTION 38
Given the code fragment:
Answer: D
Explanation:
NEW QUESTION 41
Given the code fragment:
A. ab cd ef
B. An ArrayIndexOutOfBoundsException is thrown at runtime.
C. The compilation fails.
D. abc def
E. ad be cf
Answer: E
NEW QUESTION 46
Given:
A. line 12
B. line 6
C. line 9
D. line 8
E. line 7
Answer: BE
NEW QUESTION 47
Given:
Answer: BD
Explanation:
NEW QUESTION 50
Examine these module declarations:
A. The ServiceProvider module is the only module that, at run time, can provide the com.example.api API.
B. The placement of the com.example.api API in a separate module, ServiceAPI, makes it easy to install multiple provider modules.
C. The Consumer module should require the ServiceProvider module.
D. The ServiceProvider module should export the com.myimpl package.
E. The ServiceProvider module does not know the identity of a module (such as Consumer) that uses the com.example.api API.
Answer: AC
NEW QUESTION 53
Given the code fragment:
A. 01
B. 1
C. The program prints nothing.
D. It prints 1 in the infinite loop.
Answer: D
NEW QUESTION 57
Which statement about a functional interface is true?
Answer: C
NEW QUESTION 61
Given:
String originalPath = “data\\projects\\a-project\\..\\..\\another-project”; Path path = Paths.get(originalPath); System.out.print(path.normalize());
What is the result?
A. data\another-project
B. data\projects\a-project\another-project
C. data\\projects\\a-project\\..\\..\\another-project
D. data\projects\a-project\..\..\another-project
Answer: D
Explanation:
NEW QUESTION 64
Given:
A. null
B. Joe Bloggs
C. The compilation fails due to an error in line 1.
D. p1
Answer: C
Explanation:
NEW QUESTION 66
Which two are successful examples of autoboxing? (Choose two.)
A. String a = “A”;
B. Integer e = 5;
C. Float g = Float.valueOf(null);
D. Double d = 4;
E. Long c = 23L;
F. Float f = 6.0;
Answer: AB
NEW QUESTION 71
Given:
Answer: D
Explanation:
NEW QUESTION 75
Given:
Answer: D
Explanation:
NEW QUESTION 76
Which two statements are true about Java modules? (Choose two.)
Answer: AC
NEW QUESTION 78
Given this requirement:
Module vehicle depends on module part and makes its com.vehicle package available for all other modules. Which module-info.java declaration meets the
requirement?
A. Option A
B. Option B
C. Option C
D. Option D
Answer: A
NEW QUESTION 80
Given:
Answer: C
Explanation:
NEW QUESTION 81
Which statement about access modifiers is correct?
Answer: B
NEW QUESTION 84
Analyze the code:
Which two options can you insert inside println method to produce Global:namescope? (Choose two.)
A. Test.prefix+Test.name
B. new Test().prefix+new Test().name
C. Test.prefix+Test.getName()
D. Test.getName+prefix
E. prefix+Test.name
F. prefix+name
Answer: BC
NEW QUESTION 87
Given:
and:
Which code, when inserted on line 10, prints the number of unique localities from the roster list?
A. .map(Employee::getLocality).distinct().count();
B. map(e > e.getLocality()).count();
C. .map(e > e.getLocality()).collect(Collectors.toSet()).count();
D. .filter(Employee::getLocality).distinct().count();
Answer: D
NEW QUESTION 89
Given:
Answer: D
Explanation:
NEW QUESTION 91
Given:
Answer: E
NEW QUESTION 95
Given:
A. 42
B. The compilation fails due to an error in line 4.
C. 17
D. The compilation fails due to an error in line 3.
E. The compilation fails due to an error in line 2.
F. The compilation fails due to an error in line 1.
G. The compilation fails due to an error in line 5.
Answer: A
A. java.logging
B. java.desktop
C. javafx
D. jdk.httpserver
E. jdk.jartool
Answer: AD
A. MessageBundle_en_US.properties
B. MessageBundle_en.properties
C. MessageBundle_fr_FR.properties
D. MessageBundle_US.properties
E. MessageBundle.properties
Answer: C
A. nothing
B. 10
C. 0 4 9
Answer: A
and
Answer: B
Explanation:
Answer: C
Relate Links
https://www.exambible.com/1Z0-819-exam/
Contact us
We are proud of our high-quality customer service, which serves you around the clock 24/7.
Viste - https://www.exambible.com/