Deal of The Day! Hurry Up, Grab the Special Discount - Save 25% - Ends In 00:00:00 Coupon code: SAVE25
Welcome to Pass4Success

- Free Preparation Discussions

Free Oracle 1Z0-809 Exam Dumps

Here you can find all the free questions related with Oracle Java SE 8 Programmer II (1Z0-809) exam. You can also find on this page links to recently updated premium files with which you can practice for actual Oracle Java SE 8 Programmer II Exam. These premium versions are provided as 1Z0-809 exam practice tests, both as desktop software and browser based application, you can use whatever suits your style. Feel free to try the Java SE 8 Programmer II Exam premium files for free, Good luck with your Oracle Java SE 8 Programmer II Exam.
Question No: 11

MultipleChoice

Given the code fragments:

class Caller implements Callable<String> {

String str;

public Caller (String s) {this.str=s;}

public String call()throws Exception { return str.concat (''Caller'');}

}

class Runner implements Runnable {

String str;

public Runner (String s) {this.str=s;}

public void run () { System.out.println (str.concat (''Runner''));}

}

and

public static void main (String[] args) throws InterruptedException, ExecutionException {

ExecutorService es = Executors.newFixedThreadPool(2);

Future f1 = es.submit (new Caller (''Call''));

Future f2 = es.submit (new Runner (''Run''));

String str1 = (String) f1.get();

String str2 = (String) f2.get();//line n1

System.out.println(str1+ '':'' + str2);

}

What is the result?

Options
Question No: 12

MultipleChoice

Given:

class Vehicle implements Comparable<Vehicle>{

int vno;

String name;

public Vehicle (int vno, String name) {

this.vno = vno,;

this.name = name;

}

public String toString () {

return vno + '':'' + name;

}

public int compareTo(Vehicle o) {

return this.name.compareTo(o.name);

}

and this code fragment:

Set<Vehicle> vehicles = new TreeSet <> ();

vehicles.add(new Vehicle (10123, ''Ford''));

vehicles.add(new Vehicle (10124, ''BMW''));

System.out.println(vehicles);

What is the result?

Options
Question No: 13

MultipleChoice

Given:

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 --da option?

Options
Question No: 14

MultipleChoice

Which statement is true about the single abstract method of the java.util.function.Predicate interface?

Options
Question No: 15

MultipleChoice

Given:

class FuelNotAvailException extends Exception { }

class Vehicle {

void ride() throws FuelNotAvailException {//line n1

System.out.println(''Happy Journey!'');

}

}

class SolarVehicle extends Vehicle {

public void ride () throws FuelNotAvailException {//line n2

super ride ();

}

}

and the code fragment:

public static void main (String[] args) throws Exception {

Vehicle v = new SolarVehicle ();

v.ride();

}

Which modification enables the code fragment to print Happy Journey!?

Options
Question No: 16

MultipleChoice

Given that these files exist and are accessible:

/sports/info.txt

/sports/cricket/players.txt

/sports/cricket/data/ODI.txt

and given the code fragment:

int maxDepth =2;

Stream<Path> paths = Files.find(Paths.get(''/sports''),

maxDepth,

(p, a) -> p.getFileName().toString().endsWith (''txt''),

FileVisitOption.FOLLOW_LINKS);

Long fCount = paths.count();

System.out.println(fCount);

Assuming that there are NO soft-link/symbolic links to any of the files in the directory structure, what is the result?

Options
Question No: 17

MultipleChoice

Given:

What change should you make to guarantee a single order of execution (printed values 1 -100 in order)?

Options
Question No: 18

MultipleChoice

Given the structure of the Student table:

Student (id INTEGER, name VARCHAR)

Given the records from the STUDENT table:

Given the code fragment:

Assume that:

What is the result?

Options
Question No: 19

MultipleChoice

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?

Options
Question No: 20

MultipleChoice

Given:

IntStream stream = IntStream.of (1,2,3);

IntFunction inFu= x -> y -> x*y; //line n1

IntStream newStream = stream.map(inFu.apply(10)); //line n2

newStream.forEach(System.output::print);

Which modification enables the code fragment to compile?

Options

Save Cancel
az-700  pass4success  az-104  200-301  200-201  cissp  350-401  350-201  350-501  350-601  350-801  350-901  az-720  az-305  pl-300  

Warning: Cannot modify header information - headers already sent by (output started at /pass.php:70) in /pass.php on line 77