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

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!
http://www.EnsurePass.com/1z0-809.html

Java SE 8 Programmer II

Question No: 81

Given the code fragment:

Maplt;Integer, Stringgt; books = new TreeMaplt;gt;(); 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 No: 82

Given:

final class Folder {//line n1

//line n2

public void open () { System.out.print(“Open”);

}

}

public class Test {

public static void main (String [] args) throws Exception { try (Folder f = new Folder()) {

f.open();

}

}

}

Which two modifications enable the code to print Open Close?

  1. Replace line n1 with:

    class Folder implements AutoCloseable {

  2. Replace line n1 with:

    class Folder extends Closeable {

  3. Replace line n1 with:

    class Folder extends Exception {

  4. At line n2, insert: final void close () {

    System.out.print(“Close”);

    }

  5. At line n2, insert:

public void close () throws IOException { System.out.print(“Close”);

}

Answer: A,C

Question No: 83

You want to create a singleton class by using the Singleton design pattern. Which two statements enforce the singleton nature of the design?

  1. Make the class static.

  2. Make the constructor private.

  3. Override equals() and hashCode() methods of the java.lang.Object class.

  4. Use a static reference to point to the single instance.

  5. Implement the Serializable interface.

Answer: A,B

Question No: 84

Given:

interface Doable {

public void doSomething (String s);

}

Which two class definitions compile?

  1. public abstract class Task implements Doable { public void doSomethingElse(String s) { }

    }

  2. public abstract class Work implements Doable { public abstract void doSomething(String s) { } public void doYourThing(Boolean b) { }

    }

  3. public class Job implements Doable { public void doSomething(Integer i) { }

    }

  4. public class Action implements Doable { public void doSomething(Integer i) { } public String doThis(Integer j) { }

    }

  5. public class Do implements Doable { public void doSomething(Integer i) { } public void doSomething(String s) { } public void doThat (String s) { }

}

Answer: C,D

Question No: 85

Given the code fragment:

Listlt;Stringgt; nL = Arrays.asList(“Jim”, “John”, “Jeff”); Functionlt;String, Stringgt; funVal = s -gt; “Hello : “.contact(s); nL.Stream()

.map(funVal)

.peek(System.out::print); What is the result?

  1. Hello : Jim Hello : John Hello : Jeff

  2. Jim John Jeff

  3. The program prints nothing.

  4. A compilation error occurs.

Answer: D

Question No: 86

Given:

Ensurepass 2018 PDF and VCE

What is the result?

  1. Null

  2. Compilation fails

  3. An exception is thrown at runtime

  4. 0

Answer: C

Question No: 87

Given the code format:

Ensurepass 2018 PDF and VCE

Which code fragment must be inserted at line 6 to enable the code to compile?

  1. DBConfiguration f; return f;

  2. Return DBConfiguration;

  3. Return new DBConfiguration;

  4. Retutn 0;

Answer: B

Question No: 88

Given the code fragment:

UnaryOperatorlt;Integergt; uo1 = s -gt; s*2;line n1 Listlt;Doublegt; loanValues = Arrays.asList(1000.0, 2000.0); loanValues.stream()

.filter(lv -gt; lv gt;= 1500)

.map(lv -gt; uo1.apply(lv))

.forEach(s -gt; System.out.print(s ” “)); What is the result?

A. 4000.0

B. 4000

  1. A compilation error occurs at line n1.

  2. A compilation error occurs at line n2.

Answer: B

Question No: 89

Given the code fragment

Ensurepass 2018 PDF and VCE

Which code fragments, inserted independently, enable the code compile?

  1. t.fvar = 200;

  2. cvar = 400;

  3. fvar = 200; cvar = 400;

  4. this.fvar = 200; this.cvar = 400;

  5. t.fvar = 200; Test2.cvar = 400;

  6. this.fvar = 200; Test2.cvar = 400;

Answer: B

Question No: 90

Which two statements are true about localizing an application?

  1. Support for new regional languages does not require recompilation of the code.

  2. Textual elements (messages and GUI labels) are hard-coded in the code.

  3. Language and region-specific programs are created using localized data.

  4. Resource bundle files include data and currency information.

  5. Language codes use lowercase letters and region codes use uppercase letters.

Answer: A,E

Reference: http://docs.oracle.com/javase/7/docs/technotes/guides/intl/

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
PDF VCE 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.