You are on page 1of 10

VCEDumps

http://www.vcedumps.com
A company provides vce files free and valid dumps pdf
Instant Download - Best Exam Practice Material - 100% Money Back Guarantee!
IT Certification Guaranteed, The Easy Way!

Exam : 1z0-809

Title : Java SE 8 Programmer II

Vendor : Oracle

Version : DEMO

1 from Vcedumps.com.
Get Latest & Valid 1z0-809 Exam's Question and Answers 1
http://www.vcedumps.com/1z0-809-examcollection.html
Instant Download - Best Exam Practice Material - 100% Money Back Guarantee!
IT Certification Guaranteed, The Easy Way!

NO.1 Given the code fragment:

What is the result?


A. Word: why Word: why what Word: why what when
B. Compilation fails at line n1.
C. Word: why Word: what Word: when
D. Word: why what when
Answer: D

NO.2 Given the code fragments:

and

What is the result?


A. class java.lang.Exception
B. class java.io.IOException
C. Video played.Game played.
D. A compilation error occurs.
Answer: A

NO.3 Given the definition of the Book class:

2 from Vcedumps.com.
Get Latest & Valid 1z0-809 Exam's Question and Answers 2
http://www.vcedumps.com/1z0-809-examcollection.html
Instant Download - Best Exam Practice Material - 100% Money Back Guarantee!
IT Certification Guaranteed, The Easy Way!

Which statement is true about the Book class?


A. It is an immutable class.
B. It is defined using the factory design pattern.
C. It demonstrates polymorphism.
D. It is defined using the singleton design pattern.
E. It demonstrates encapsulation.
Answer: E

NO.4 Given the code fragment:

What is the result?


A. Match 2
B. A nullPointerException is thrown at runtime.
C. No Match
D. Match 1
Answer: A

NO.5 Given the code fragment:


List<Integer> codes = Arrays.asList (10, 20);
UnaryOperator<Double> uo = s -> s +10.0;
codes.replaceAll(uo);
codes.forEach(c -> System.out.println(c));
What is the result?
A. 20.0
30.0
B. A compilation error occurs.
C. A NumberFormatException is thrown at run time.
D. 10

3 from Vcedumps.com.
Get Latest & Valid 1z0-809 Exam's Question and Answers 3
http://www.vcedumps.com/1z0-809-examcollection.html
Instant Download - Best Exam Practice Material - 100% Money Back Guarantee!
IT Certification Guaranteed, The Easy Way!

Answer: B

NO.6 Given:

What is the result?


A. Compilation fails.
B. 0 0
C. 3 5
D. 9 25
Answer: C

NO.7 Given:

What is the result?


A. bo
B. nbo
C. nb
D. box
E. An exception is thrown at runtime
Answer: E

NO.8 Given the code fragment:

4 from Vcedumps.com.
Get Latest & Valid 1z0-809 Exam's Question and Answers 4
http://www.vcedumps.com/1z0-809-examcollection.html
Instant Download - Best Exam Practice Material - 100% Money Back Guarantee!
IT Certification Guaranteed, The Easy Way!

What is the result?


A. Val:20 Val:40 Val:60
B. Val: Val: Val:
C. Val:10 Val:20 Val:30
D. A compilation error occurs.
Answer: A

NO.9 Given:
class Book {
int id;
String name;
public Book (int id, String name) {
this.id = id;
this.name = name;
}
public boolean equals (Object obj) { //line n1
boolean output = false;
Book b = (Book) obj;
if (this.name.equals(b name))}
output = true;
}
return output;
}
}
and the code fragment:
Book b1 = new Book (101, "Java Programing");
Book b2 = new Book (102, "Java Programing");
System.out.println (b1.equals(b2)); //line n2
Which statement is true?
A. A compilation error occurs. To ensure successful compilation, replace line n1 with:
boolean equals (Book obj) {
B. The program prints true.
C. A compilation error occurs. To ensure successful compilation, replace line n2 with:
System.out.println (b1.equals((Object) b2));
D. The program prints false.
Answer: B

NO.10 Given the code fragment:

5 from Vcedumps.com.
Get Latest & Valid 1z0-809 Exam's Question and Answers 5
http://www.vcedumps.com/1z0-809-examcollection.html
Instant Download - Best Exam Practice Material - 100% Money Back Guarantee!
IT Certification Guaranteed, The Easy Way!

What is the result?


A. 1000 : 4000
B. 4000 : 2000
C. 4000 : 1000
D. 1000 : 2000
Answer: B

NO.11 Given the code fragment:

What is the result?


A. 2413
B. 1324
C. 3142
D. 4231
Answer: A

NO.12 Given the code fragment:

Which two modifications, when made independently, enable the code to print Joe:true:100.0?

6 from Vcedumps.com.
Get Latest & Valid 1z0-809 Exam's Question and Answers 6
http://www.vcedumps.com/1z0-809-examcollection.html
Instant Download - Best Exam Practice Material - 100% Money Back Guarantee!
IT Certification Guaranteed, The Easy Way!

A. Option B
B. Option E
C. Option D
D. Option C
E. Option A
Answer: C,D
Explanation:
A is wrong because "Cannot use this. in a static context"
B is wrong because true is written in capital letters
E is wrong because "The constructor Employee(String, boolean, int) is undefined", there should be a
parameterized constructor for class Employee

NO.13 Given the code format:

Which code fragment must be inserted at line 6 to enable the code to compile?
A. Retutn 0;
B. DBConfiguration f;
return f;
C. Return new DBConfiguration;
D. Return DBConfiguration;
Answer: C

7 from Vcedumps.com.
Get Latest & Valid 1z0-809 Exam's Question and Answers 7
http://www.vcedumps.com/1z0-809-examcollection.html
Instant Download - Best Exam Practice Material - 100% Money Back Guarantee!
IT Certification Guaranteed, The Easy Way!

NO.14 Which two are elements of a singleton class? (Choose two.)


A. a transient reference to point to the single instance
B. a private constructor to the class
C. a public reference to point to the single instance
D. a public static method to return a copy of the singleton reference
E. a public method to instantiate the single instance
Answer: B,E

NO.15 Given:

What is the result?


A. Hello Log 1:0
B. Welcome Log 2:1
C. Hello Log 2:1
D. Welcome Log 1:0
Answer: B

NO.16 Given that these files exist and are accessible:

and given the code fragment:

Which code fragment can be inserted at line n1to enable the code to print only
/company/emp?
A. Stream<Path> stream = Files.list (Paths.get ("/company/emp"));
B. Stream<Path> stream = Files.list (Paths.get ("/company"));
C. Stream<Path> stream = Files.walk (Paths.get ("/company"));
D. Stream<Path> stream = Files.find(
Paths.get ("/company"), 1,
(p,b) -> b.isDirectory (), FileVisitOption.FOLLOW_LINKS);
Answer: D

NO.17 Given:

8 from Vcedumps.com.
Get Latest & Valid 1z0-809 Exam's Question and Answers 8
http://www.vcedumps.com/1z0-809-examcollection.html
Instant Download - Best Exam Practice Material - 100% Money Back Guarantee!
IT Certification Guaranteed, The Easy Way!

And given the commands:

What is the result?


A. An exception is thrown at runtime.
B. Compilation fails.
C. Success
D. Failure
Answer: D

NO.18 Given the content:

and the code fragment:

What is the result?


A. username = Enter User Name
password = Enter Password
B. The program prints nothing.
C. username = Entrez le nom d'utilisateur
password = Entrez le mot de passe
D. A compilation error occurs.
Answer: C

9 from Vcedumps.com.
Get Latest & Valid 1z0-809 Exam's Question and Answers 9
http://www.vcedumps.com/1z0-809-examcollection.html

You might also like