New Year Sale ! 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: 1

MultipleChoice

Given the code fragment:

BiFunction<Integer, Double, Integer> val = (t1, t2) -> t1 + t2; //line n1

//line n2

System.out.println(val.apply(10, 10.5));

What is the result?

Options
Question No: 2

MultipleChoice

Given:

class Student {

String course, name, city;

public Student (String name, String course, String city) {

this.course = course; this.name = name; this.city = city;

}

public String toString() {

return course + '':'' + name + '':'' + city;

}

public String getCourse() {return course;}

public String getName() {return name;}

public String getCity() {return city;}

and the code fragment:

List<Student> stds = Arrays.asList(

new Student (''Jessy'', ''Java ME'', ''Chicago''),

new Student (''Helen'', ''Java EE'', ''Houston''),

new Student (''Mark'', ''Java ME'', ''Chicago''));

stds.stream()

.collect(Collectors.groupingBy(Student::getCourse))

.forEach(src, res) -> System.out.println(res));

What is the result?

Options
Question No: 3

MultipleChoice

Given the code fragments:

class Employee {

Optional<Address> address;

Employee (Optional<Address> address) {

this.address = address;

}

public Optional<Address> getAddress() { return address; }

}

class Address {

String city = ''New York'';

public String getCity { return city: }

public String toString() {

return city;

}

}

and

Address address = new Address;

Optional<Address> addrs1 = Optional.ofNullable (address);

Employee e1 = new Employee (addrs1);

String eAddress = (addrs1.isPresent()) ? addrs1.get().getCity() : ''City Not

available'';

System.out.println(eAddress);

What is the result?

Options
Question No: 4

MultipleChoice

Given the code fragment:

public void recDelete (String dirName) throws IOException {

File [ ] listOfFiles = new File (dirName) .listFiles();

if (listOfFiles ! = null && listOfFiles.length >0) {

for (File aFile : listOfFiles) {

if (!aFile.isDirectory ()) {

if (aFile.getName ().endsWith (''.class''))

aFile.delete ();

}

}

}

}

Assume that Projects contains subdirectories that contain .class files and is passed as an argument to the recDelete () method when it is invoked.

What is the result?

Options
Question No: 5

MultipleChoice

Given records from the Player table:

and given the code fragment:

try {

Connection conn = DriverManager.getConnection(URL, username, password);

Statement st= conn.createStatement(

ResultSet.TYPE_SCROLL_SENSITIVE,

ResultSet.CONCUR_UPDATABLE);

st.execute (''SELECT * FROM Player'');

st.setMaxRows(2);

ResultSet rs = st.getResultSet();

rs.absolute(3);

while (rs.next ()) {

System.out.println(rs.getInt(1) + '' '' + rs.getString(2));

}

} catch (SQLException ex) {

System.out.print(''SQLException is thrown.'');

}

Assume that:

The required database driver is configured in the classpath.

The appropriate database is accessible with URL, username, and password.

The SQL query is valid.

What is the result?

Options
Question No: 6

MultipleChoice

Given:

Item table

* ID, INTEGER: PK

* DESCRIP, VARCHAR(100)

* PRICE, REAL

* QUANTITY< INTEGER

And given the code fragment:

9. try {

10.Connection conn = DriveManager.getConnection(dbURL, username, password);

11. String query = ''Select * FROM Item WHERE ID = 110'';

12. Statement stmt = conn.createStatement();

13. ResultSet rs = stmt.executeQuery(query);

14.while(rs.next()) {

15.System.out.println(''ID:'' + rs.getString(1));

16.System.out.println(''Description:'' + rs.getString(2));

17.System.out.println(''Price:'' + rs.getString(3));

18. System.out.println(Quantity:'' + rs.getString(4));

19.}

20. } catch (SQLException se) {

21. System.out.println(''Error'');

22. }

Assume that:

The required database driver is configured in the classpath.

The appropriate database is accessible with the dbURL, userName, and passWord exists.

The SQL query is valid.

What is the result?

Options
Question No: 7

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: 8

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: 9

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: 10

MultipleChoice

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

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