web analytics

Free PassLeader 1Z0-809 Exam Dumps with VCE and PDF Download (Question 81 – Question 90)

PassLeader now are offering 100% pass ensure 1Z0-809 dumps! All 1Z0-809 exam questions have been updated with correct answers, welcome to download the newest PassLeader 1Z0-809 VCE dumps and PDF dumps: https://www.passleader.com/1z0-809.html (132 Q&As –> 201 Q&As)

BTW: Download PassLeader 1Z0-809 dumps from Google Drive for free: https://drive.google.com/open?id=0B-ob6L_QjGLpNTlzOWE4bXRKMmM

QUESTION 81
Given the code fragment:
Path source = Paths.get (“/data/december/log.txt”);
Path destination = Paths.get(“/data”);
Files.copy (source, destination);
and assuming that the file /data/december/log.txt is accessible and contains: 10-Dec-2014 executed successfully. What is the result?

A.    A file with the name log.txt is created in the /data directory and the content of the /data/december/log.txt file is copied to it.
B.    The program executes successfully and does NOT change the file system.
C.    A FileNotFoundException is thrown at run time.
D.    A FileAlreadyExistsException is thrown at run time.

Answer: B

QUESTION 82
The protected modifier on a Field declaration within a public class means that the field ____.

A.    cannot be modified
B.    can be read but not written from outside the class
C.    can be read and written from this class and its subclasses only within the same package
D.    can be read and written from this class and its subclasses defined in any package

Answer: D
Explanation:
http://beginnersbook.com/2013/05/java-access-modifiers/

QUESTION 83
Given:
passleader-1Z0-809-dumps-831
What is the result?

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

Answer: E

QUESTION 84
Given:
class CheckClass {
public static int checkValue (String s1, String s2) {
return s1 length() ?s2.length();
}
}
and the code fragment:
String[] strArray = new String [] {“Tiger”, “Rat”, “Cat”, “Lion”}
//line n1
for (String s : strArray) {
System.out.print (s + ” “);
}
Which code fragment should be inserted at line n1 to enable the code to print Rat Cat Lion Tiger?

A.    Arrays.sort(strArray, CheckClass : : checkValue);
B.    Arrays.sort(strArray, (CheckClass : : new) : : checkValue);
C.    Arrays.sort(strArray, (CheckClass : : new).checkValue);
D.    Arrays.sort(strArray, CheckClass : : new : : checkValue);

Answer: D

QUESTION 85
Given the code fragment:
Map<Integer, String> books = new TreeMap<>();
books.put (1007, “A”);
books.put (1002, “C”);
books.put (1001, “B”);
books.put (1003, “B”);
System.out.println (books);
What is the result?

A.    {1007 = A, 1002 = C, 1001 = B, 1003 = B}
B.    {1001 = B, 1002 = C, 1003 = B, 1007 = A}
C.    {1002 = C, 1003 = B, 1007 = A}
D.    {1007 = A, 1001 = B, 1003 = B, 1002 = C}

Answer: D

QUESTION 86
Given the code fragment:
public class ForTest {
public static void main(String[] args) {
int[] arrar = {1,2,3};
for ( foo ) {
}
}
}
Which three are valid replacements for ( foo ) so that the program will compiled and run? (Choose three.)

A.    int i: array
B.    int i = 0; i < 1; i++
C.    ;;
D.    ; i < 1; i++
E.    ; i < 1;

Answer: ABC

QUESTION 87
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);
v.increSpeed(60);
What is the result?

A.    Velocity with new speed.
B.    A compilation error occurs at line n1.
C.    A compilation error occurs at line n2.
D.    A compilation error occurs at line n3.

Answer: A

QUESTION 88
Given:
passleader-1Z0-809-dumps-881
What is the result?

A.    The program prints nothing
B.    d
C.    A StringIndexOutOfBoundsException is thrown at runtime
D.    AnArrayIndexOutOfBoundsException is thrown at runtime
E.    A NullPointerException is thrown at runtime

Answer: C

QUESTION 89
Given:
passleader-1Z0-809-dumps-891
What is the result?

A.    Red 0
Orange 0
Green 3
B.    Red 0
Orange 0
Green 6
C.    Red 0
Orange 1
D.    Green 4
E.    Compilation fails

Answer: E

QUESTION 90
Given the code fragments:
interface CourseFilter extends Predicate<String> {
public default boolean test (String str) {
return str.equals (“Java”);
}
}
and
List<String> strs = Arrays.asList(“Java”, “Java EE”, “Java ME”);
Predicate<String> cf1 = s – > s.length() > 3;
Predicate cf2 = new CourseFilter() {//line n1
public boolean test (String s) {
return s.contains (“Java”);
}
};
long c = strs.stream()
.filter(cf1)
.filter(cf2//line n2
.count();
System.out.println(c);
What is the result?

A.    2
B.    3
C.    A compilation error occurs at line n1
D.    A compilation error occurs at line n2

Answer: A


PassLeader now are offering 100% pass ensure 1Z0-809 dumps! All 1Z0-809 exam questions have been updated with correct answers, welcome to download the newest PassLeader 1Z0-809 VCE dumps and PDF dumps: https://www.passleader.com/1z0-809.html (132 Q&As –> 201 Q&As)

BTW: Download PassLeader 1Z0-809 dumps from Google Drive for free: https://drive.google.com/open?id=0B-ob6L_QjGLpNTlzOWE4bXRKMmM