1Z0-809 Questions And Answers


Exam Name: Java SE 8 Programmer II

Updated: 2019-06-23

Q & A: 160

Money Back Guaranteed
  Customers who bought this item also bought

1Z0-809 Frequently Asked Questions

Q1: Can I use 1Z0-809 exam Q&As in my phone?
Yes, PassQuestion provides Java and Middleware 1Z0-809 pdf Q&As which you can download to study on your computer or mobile device, we also provide 1Z0-809 pdf free demo which from the full version to check its quality before purchasing.

Q2: What are the formats of your Oracle 1Z0-809 exam questions?
PassQuestion provides Oracle 1Z0-809 exam questions with pdf format and software format, pdf file will be sent in attachment and software file in a download link, you need to download the link in a week, it will be automatically invalid after a week.

Q3: How can I download my 1Z0-809 test questions after purchasing?
We will send Java and Middleware 1Z0-809 test questions to your email once we receive your order, pls make sure your email address valid or leave an alternate email.

Q4: How long can I get my Java and Middleware 1Z0-809 questions and answers after purchasing?
We will send Java and Middleware 1Z0-809 questions and answers to your email in 10 minutes in our working time and no less than 12 hours in our off time.

Working Time:
GMT+8: Monday- Saturday 8:00 AM-18:00 PM
GMT: Monday- Saturday 0:00 AM-10:00 AM

Q5: Can I pass my test with your Java and Middleware 1Z0-809 practice questions only?
Sure! All of PassQuestion Java and Middleware 1Z0-809 practice questions come from real test. If you can practice well and get a good score in our practice Q&As, we ensure you can pass your Java SE 8 Programmer II exam easily.

Q6: How can I know my 1Z0-809 updated? 
You can check the number of questions, if it is changed,that means we have updated this exam ,you can contact us anytime to ask for an free update. our sales email : [email protected]

Q7: What is your refund process if I fail Oracle  1Z0-809 test?
If you fail your 1Z0-809 test in 60 days by studying our study material, just scan your score report and send to us in attchment,when we check, we will give you full refund.

Q8. What other payment menthod can I use except Paypal?
If your country don't support Paypal, we offer another Payment method Western Union,it is also safe and fast. Pls contact us for the details, we will send it to your email.

Question No : 1

IntStream stream = IntStream.of (1, 2,3);
IntFunction<Integer> inFu= x -> y -> x*y;//line n1
IntStream newStream = stream.map (inFu.apply(10));//line n2
Which modification enables the code fragment to compile?
A. Replaceline n1with:
IntFunction<UnaryOperator> inFu = x -> y -> x*y;
B. Replaceline n1with:
IntFunction<IntUnaryOperator> inFu = x -> y -> x*y;
C. Replaceline n1with:
BiFunction<IntUnaryOperator> inFu = x -> y -> x*y;
D. Replaceline n2with:
IntStream newStream = stream.map(inFu.applyAsInt (10));
Answer: D

Question No : 2

Given the definition of the Vehicle class:
Class Vehhicle {
int distance;//line n1
Vehicle (int x) {
this distance = x;
public void increSpeed(int time) {//line n2
int timeTravel = time;//line n3
class Car {
int value = 0;
public void speed () {
value = distance /timeTravel;
System.out.println (¡°Velocity with new speed¡±+value+¡±kmph¡±);
new Car().speed();
and this code fragment:
Vehicle v = new Vehicle (100);
What is the result?
A. Velocity with new speed
B. A compilation error occurs atline n1.
C. A compilation error occurs atline n2.
D. A compilation error occurs atline n3.
Answer: A

Question No : 3

interface Rideable {Car getCar (String name); }
class Car {
private String name;
public Car (String name) {
this.name = name;
Which code fragment creates an instance of Car?
A. Car auto = Car (¡°MyCar¡±):: new;
B. Car auto = Car: : new; Car vehicle = auto : : getCar(¡°MyCar¡±);
C. Rideable rider = Car: : new; Car vehicle = rider.getCar(¡°MyCar¡±);
D. Car vehicle = Rideable: : new : : getCar(¡°MyCar¡±);
Answer: C

Question No : 4

public enum USCurrency {
PENNY (1),
DIME (10),
private int value;
public USCurrency(int value) {
this.value = value;
public int getValue() {return value;}
public class Coin {
public static void main (String[] args) {
USCurrency usCoin =new USCurrency.DIME;
Which two modifications enable the given code to compile?
A. Nest the USCurrencyenumeration declaration within the Coin class.
B. Make the USCurrencyenumeration constructorprivate.
C. Remove the new keyword from the instantion of us Coin.
D. Make the getter method of valueas astaticmethod.
E. Add the finalkeyword in the declaration of value.
Answer: A,E

Question No : 5

class Bird {
public void fly () { System.out.print(¡°Can fly¡±); }
class Penguin extends Bird {
public void fly () { System.out.print(¡°Cannot fly¡±); }
and the code fragment:
class Birdie {
public static void main (String [ ] args) {
fly( ( ) -> new Bird ( ));
fly (Penguin : : new);
/* line n1 */
Which code fragment, when inserted at line n1, enables the Birdie class to compile?
A. static void fly (Consumer<Bird> bird) {
bird :: fly ();
B. static void fly (Consumer<? extends Bird> bird) {
bird.accept( ) fly ();
C. static void fly (Supplier<Bird> bird) {
bird.get( ) fly ();
D. static void fly (Supplier<? extends Bird> bird) {
Answer: C

Question No : 6

Which action can be used to load a database driver by using JDBC3.0?
A. Add the driver class to the META-INF/services folder of the JAR file.
B. Include the JDBC driver classin ajdbc.propertiesfile.
C. Use thejava.lang.Class.forNamemethod to load the driver class.
D. Use theDriverManager.getDrivermethod to load the driver class.
Answer: D

Question No : 7

public class Foo<K, V> {
private K key;
private V value;
public Foo (K key, V value) (this.key = key; this value = value;)
public static <T> Foo<T, T> twice (T value) (return new Foo<T, T> (value, value); )
public K getKey () (return key;)
public V getValue () (return value;)
Which option fails?
A. Foo<String, Integer> mark = new Foo<String, Integer> (¡°Steve¡±, 100);
B. Foo<String, String> pair = Foo. <String>twice (¡°Hello World!¡±);
C. Foo<?, ?> percentage = new Foo <> (97, 32);
D. Foo<String, String> grade = new Foo <> (¡°John¡±, ¡°A¡±);
Answer: C

Question No : 8

Given the code fragment:
List<String> listVal = Arrays.asList (¡°Joe¡±, ¡°Paul¡±, ¡°Alice¡±, ¡°Tom¡±);
System.out.println (
// line n1
Which code fragment, when inserted at line n1, enables the code to print the count of string elements whose length is greater than three?
A. listVal.stream().filter(x -> x.length()>3).count()
B. listVal.stream().map(x -> x.length()>3).count()
C. listVal.stream().peek(x -> x.length()>3).count().get()
D. listVal.stream().filter(x -> x.length()>3).mapToInt(x -> x).count()
Answer: C

Question No : 9

Given that course.txt is accessible and contains:
Course: : Java
and given the code fragment:
public static void main (String[ ] args) {
int i;
char c;
try (FileInputStream fis = new FileInputStream (¡°course.txt¡±);
InputStreamReader isr = new InputStreamReader(fis);) {
while (isr.ready()) { //line n1
i = isr.read ();
c = (char) i;
} catch (Exception e) {
What is the result?
A. ur ::va
B. ueJa
C. The program prints nothing.
D. A compilation error occurs atline n1.
Answer: A

Question No : 10

Given the code fragment:
Stream<Path> files = Files.walk(Paths.get(System.getProperty(¡°user.home¡±)));
files.forEach (fName -> {//line n1
try {
Path aPath = fName.toAbsolutePath();//line n2
System.out.println(fName + ¡°:¡±
+ Files.readAttributes(aPath, Basic.File.Attributes.class).creationTime
} catch (IOException ex) {
What is the result?
A. All files and directories under thehomedirectory are listed along with their attributes.
B. A compilation error occurs atline n1.
C. The files in the home directory are listed along with their attributes.
D. A compilation error occurs atline n2.
Answer: A

Question No : 11

Given the definition of the Country class:
public class country {
public enum Continent {ASIA, EUROPE}
String name;
Continent region;
public Country (String na, Continent reg) {
name = na, region = reg;
public String getName () {return name;}
public Continent getRegion () {return region;}
and the code fragment:
List<Country> couList = Arrays.asList (
new Country (¡°Japan¡±, Country.Continent.ASIA),
new Country (¡°Italy¡±, Country.Continent.EUROPE),
new Country (¡°Germany¡±, Country.Continent.EUROPE));
Map<Country.Continent, List<String>> regionNames = couList.stream ()
.collect(Collectors.groupingBy (Country ::getRegion,
Collectors.mapping(Country::getName, Collectors.toList()))));
What is the output?
A. {EUROPE = [Italy, Germany], ASIA = [Japan]}
B. {ASIA = [Japan], EUROPE = [Italy, Germany]}
C. {EUROPE = [Germany, Italy], ASIA = [Japan]}
D. {EUROPE = [Germany], EUROPE = [Italy], ASIA = [Japan]}
Answer: A

Question No : 12

public class Counter {
public static void main (String[ ] args) {
int a = 10;
int b = -1;
assert (b >=1) : ¡°Invalid Denominator¡±;
int = a / b;
System.out.println (c);
What is the result of running the code with the ¨Cea option?
A. -10
B. 0
C. An AssertionErroris thrown.
D. A compilation error occurs.
Answer: B

Question No : 13

Given the code fragments:
public class Book implements Comparator<Book> {
String name;
double price;
public Book () {}
public Book(String name, double price) {
this.name = name;
this.price = price;
public int compare(Book b1, Book b2) {
return b1.name.compareTo(b2.name);
public String toString() {
return name + ¡°:¡± + price;
List<Book>books = Arrays.asList (new Book (¡°Beginning with Java¡±, 2), new book (¡°A
Guide to Java Tour¡±, 3));
Collections.sort(books, new Book());
What is the result?
A. [A Guide to Java Tour: 3, Beginning with Java: 2]
B. [Beginning with Java: 2, A Guide to Java Tour: 3]
C. A compilation error occurs because the Bookclass does not override the abstract methodcompareTo().
D. An Exceptionis thrown at run time.
Answer: A

Question No : 14

Given the definition of the Vehicle class:
class Vehicle {
String name;
void setName (String name) {
this.name = name;
String getName() {
return name;
Which action encapsulates the Vehicle class?
A. Make theVehicleclasspublic.
B. Make thenamevariablepublic.
C. Make thesetNamemethodpublic.
D. Make thenamevariableprivate.
E. Make thesetNamemethodprivate.
F. Make thegetNamemethodprivate.
Answer: B

Question No : 15

Given the code fragments:
class MyThread implements Runnable {
private static AtomicInteger count = new AtomicInteger (0);
public void run () {
int x = count.incrementAndGet();
System.out.print (x+¡± ¡°);
Thread thread1 = new Thread (new MyThread());
Thread thread2 = new Thread (new MyThread());
Thread thread3 = new Thread (new MyThread());
Thread [] ta = {thread1, thread2, thread3};
for (int x= 0; x < 3; x++) {
Which statement is true?
A. The program prints 12 3 and the order is unpredictable.
B. The program prints 1 2 3.
C. The program prints 1 1 1.
D. A compilation error occurs.
Answer: B
Chauncey Cecchinato

29 May, 2019

1Z0-809 exam question is very useful. I have passed 1Z0-809 exam today with good scores.
Eusebio Waight

02 May, 2019

Thanks very much! This time I have passed 1Z0-809 easily. Due to your Passquestion site help.
Ralph Narvaiz

01 Apr, 2019

Today all 1Z0-809 questions are from your Passquestion material, so i passed the exam without doubt. thanks for it. Recommend.
Bradley Byro

22 Mar, 2019

Passed 1Z0-809 today...100% valid…New update questions are valid.
Donnell Murin

16 Mar, 2019

Excellent 1Z0-809 training material I found as far. Thank you.
Lind Tancy

12 Mar, 2019

Passed my 1Z0-809 exam today, your updated questions are valid, Thanks very much.

Bryant Paneto

19 Jan, 2019

I have passed my 1Z0-809 exam it means that I used the excellent exam guide of PassQuestion.
Julian Posadas

19 Jan, 2019

I have passed my 1Z0-809 exam it means that I used the excellent exam guide of PassQuestion.
Granville Ripley

30 Oct, 2018

Choose your 1Z0-809 exam test material, passed 1Z0-809 exam test now.

Add Comments

Your Rating