[Free] 2018(Jan) EnsurePass Testinsides Oracle 1z0-809 Dumps with VCE and PDF 61-70

By | January 25, 2018

Ensurepass.com : Ensure you pass the IT Exams
2018 Jan Oracle Official New Released 1z0-809
100% Free Download! 100% Pass Guaranteed!

Java SE 8 Programmer II

Question No: 61

Which two code blocks correctly initialize a Locale variable?

  1. Locale loc1 = “UK”;

  2. Locale loc2 = Locale.getInstance(“ru”);

  3. Locale loc3 = Locale.getLocaleFactory(“RU”);

  4. Locale loc4 = Locale.UK;

  5. Locale loc5 = new Locale (“ru”, “RU”);

Answer: D,E

Question No: 62

Given the code fragments:

class Employee { Optionallt;Addressgt; address;

Employee (Optionallt;Addressgt; address) { this.address = address;


public Optionallt;Addressgt; getAddress() { return address; }


class Address {

String city = “New York”;

public String getCity { return city: } public String toString() {

return city;




Address address = null;

Optionallt;Addressgt; addrs1 = Optional.ofNullable (address); Employee e1 = new Employee (addrs1);

String eAddress = (addrs1.isPresent()) ? addrs1.get().getCity() : “City Not available”;

What is the result?

  1. New York

  2. City Not available

  3. null

  4. A NoSuchElementException is thrown at run time.

Answer: C

Question No: 63


Ensurepass 2018 PDF and VCE

What is the result?

  1. Initialized Started

  2. Initialized Started Initialized

  3. Compilation fails

  4. An exception is thrown at runtime

Answer: B

Question No: 64


class Vehicle { int vno;

String name;

public Vehicle (int vno, String name) { this.vno = vno,;

this.name = name;


public String toString () { return vno “:” name;



and this code fragment:

Setlt;Vehiclegt; vehicles = new TreeSet lt;gt; (); vehicles.add(new Vehicle (10123, “Ford”)); vehicles.add(new Vehicle (10124, “BMW”)); System.out.println(vehicles);

What is the result?

  1. 10123 Ford 10124 BMW

  2. 10124 BMW 10123 Ford

  3. A compilation error occurs.

  4. A ClassCastException is thrown at run time.

Answer: B

Question No: 65

For which three objects must a vendor provide implementations in its JDBC driver?

  1. Time

  2. Date

  3. Statement

  4. ResultSet

  5. Connection

  6. SQLException

  7. DriverManager

Answer: C,D,E

Explanation: Database vendors support JDBC through the JDBC driver interface or through the ODBC connection. Each driver must provide implementations of java.sql.Connection, java.sql.Statement, java.sql.PreparedStatement, java.sql.CallableStatement, and java.sql.Re sultSet. They must also implement the java.sql.Driver interface for use by the generic java.sql.DriverManager interface.

Question No: 66


public class SampleClass {

public static void main(String[] args) {

AnotherSampleClass asc = new AnotherSampleClass(); SampleClass sc = new SampleClass();

sc = asc;

System.out.println(quot;sc: quot; sc.getClass()); System.out.println(quot;asc: quot; asc.getClass());


class AnotherSampleClass extends SampleClass {


What is the result?

  1. sc: class Object

    asc: class AnotherSampleClass

  2. sc: class SampleClass

    asc: class AnotherSampleClass

  3. sc: class AnotherSampleClass asc: class SampleClass

  4. sc: class AnotherSampleClass asc: class AnotherSampleClass

Answer: D

Question No: 67


public class Testlt;Tgt; { private T t;

public T get () { return t;


public void set (T t) { this.t = t;


public static void main (String args [ ] ) { Testlt;Stringgt; type = new Testlt;gt;();

Test type 1 = new Test ();//line n1 type.set(“Java”); type1.set(100);//line n2

System.out.print(type.get() ” ” type1.get());



What is the result?

  1. Java 100

  2. java.lang.string@lt;hashcodegt;java.lang.Integer@lt;hashcodegt;

  3. A compilation error occurs. To rectify it, replace line n1 with: Testlt;Integergt; type1 = new Testlt;gt;();

  4. A compilation error occurs. To rectify it, replace line n2 with: type1.set (Integer(100));

Answer: C

Question No: 68

Given the code fragment:

Listlt;Stringgt; colors = Arrays.asList(“red”, “green”, “yellow”); Predicatelt;Stringgt; test = n – gt; { System.out.println(“Searching…”);

return n.contains(“red”);



.filter(c -gt; c.length() gt; 3)

.allMatch(test); What is the result?

  1. Searching…

  2. Searching… Searching…

  3. Searching… Searching… Searching…

  4. A compilation error occurs.

Answer: D

Question No: 69

Which two statements are true for a two-dimensional array?

  1. It is implemented as an array of the specified element type.

  2. Using a row by column convention, each row of a two-dimensional array must be of the same size.

  3. At declaration time, the number of elements of the array in each dimension must be specified.

  4. All methods of the class Object may be invoked on the two-dimensional array.

Answer: A,D

Question No: 70

Given the code fragment:

LocalDate valentinesDay =LocalDate.of(2015, Month.FEBRUARY, 14); LocalDate nextYear = valentinesDay.plusYears(1); nextYear.plusDays(15); //line n1

System.out.println(nextYear); What is the result?

A. 2016-02-14

B. A DateTimeException is thrown.

C. 2016-02-29

D. A compilation error occurs at line n1.

Answer: B

100% Ensurepass Free Download!
Download Free Demo:1z0-809 Demo PDF
100% Ensurepass Free Guaranteed!
1z0-809 Dumps

EnsurePass ExamCollection Testking
Lowest Price Guarantee Yes No No
Up-to-Dated Yes No No
Real Questions Yes No No
Explanation Yes No No
Free VCE Simulator Yes No No
Instant Download Yes No No

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.