The Up to the minute Guide To 1Z0-804 free demo Nov 2017

We provide real 1Z0-804 exam questions and answers braindumps in two formats. Download PDF & Practice Tests. Pass Oracle 1Z0-804 Exam quickly & easily. The 1Z0-804 PDF type is available for reading and printing. You can print more and practice many times. With the help of our Oracle 1Z0-804 dumps pdf and vce product and material, you can easily pass the 1Z0-804 exam.

2017 NEW RECOMMEND

Free VCE & PDF File for Oracle 1Z0-804 Real Exam
(Full Version!)

Pass on Your First TRY 100% Money Back Guarantee Realistic Practice Exam Questions

Free Instant Download NEW 1Z0-804 Exam Dumps (PDF & VCE):
Available on:
http://www.certleader.com/1Z0-804-dumps.html

Q21. Which statement declares a generic class? 

A. public class Example < T > { } 

B. public class <Example> { } 

C. public class Example <> { } 

D. public class Example (Generic) { } 

E. public class Example (G) { } 

F. public class Example { } 

Answer:

Explanation: 

Example: 

public class Pocket<T> 

private T value; 

public Pocket() {} 

public Pocket( T value ) { this.value = value; } 

public void set( T value ) { this.value = value; } 

public T get() { return value; } 

public boolean isEmpty() { return value != null; } 

public void empty() { value = null; } 

Q22. Select four examples that initialize a NumberFormat reference using a factory. 

A. NumberFormat nf1 = new DecimalFormat(); 

B. NumberFormat nf2 = new DecimalFormat("0.00") ; C. NumberFormat nf3 = NumberFormat.getInstance(); 

D. NumberFormat nf4 = NumberFormat.getIntegerInstance(); 

E. NumberFormat nf5 = DecimalFormat.getNumberInstance (); 

F. NumberFormat nf6 = NumberFormat.getCurrencyInstance () ; 

Answer: C,D,E,F 

Explanation: 

getInstance 

public static finalNumberFormatgetInstance() 

Returns the default number format for the current default locale. The default format is one 

of the styles 

provided by the other factory methods: getNumberInstance(E), getIntegerInstance(D), 

getCurrencyInstance(F) 

or getPercentInstance. Exactly which one is locale dependant. 

C: To obtain a NumberFormat for a specific locale, including the default locale, call one of NumberFormat'sfactory methods, such as getInstance(). E:To obtain standard formats for a given locale, use the factory methods on NumberFormat such asgetNumberInstance. These factories will return the most appropriate sub-class of NumberFormat for a givenlocale. F:To obtain standard formats for a given locale, use the factory methods on NumberFormat such asgetInstance or getCurrencyInstance. 

Reference:java.textClass NumberFormat 

Q23. What are two differences between Callable and Runnable? 

A. A Callable can return a value when executing, but a Runnable cannot. 

B. A Callable can be executed by a ExecutorService, but a Runnable cannot. 

C. A Callable can be passed to a Thread, but a Runnable cannot. 

D. A Callable can throw an Exception when executing, but a Runnable cannot. 

Answer: A,D 

Explanation: 

The Callable interface is similar to Runnable, in that both are designed for classes whose instances arepotentially executed by another thread. A Runnable, however, does not return a result and cannot throw achecked exception. 

Q24. The two methods of code reuse that aggregate the features located in multiple classes are ____________ ? 

A. Inheritance 

B. Copy and Paste 

C. Composition 

D. Refactoring 

E. Virtual Method Invocation 

Answer: A,C 

Explanation: 

A: Inheritance is a way of reusing code and building bigger more functional objects from a 

basic object. 

The original little object, the parent, is called the super-class. The more functional object 

that inherits from it iscalled the sub-class . 

C: When your goal is code reuse, composition provides an approach that yields easier-to-change code. 

Q25. Given: 

What is the result? 

A. Cue sports, Cue sports 

B. Compilation fails at line 9 

C. Compilation fails at line 11 

D. Compilation fails at line 12 

E. Compilation fails at line 13 

Answer:

Explanation: 

Class Snooker is public. Should be declared in a separate file. // Line 9 getCategory() >>> GetCategory() Line 13 

Q26. Given: 

What is the result? 

A. Compilation succeeds. 

B. Compilation fails due to an error on line 1. 

C. Compilation fails due to an error on line 2. 

D. Compilation fails due to an error on line 3. 

E. Compilation fails due to an error on line 4. 

F. Compilation fails due to an error on line 8. 

Answer:

Q27. Given the class? 

What is the result? 

A. Jane Doe John Doe Joe Shmoe 

B. John Doe Jane Doe Joe Shmoe 

C. Joe Shmoe John Doe Jane Doe 

D. Joe Shmoe Jane Doe John Doe 

E. Jane Doe Joe Shmoe John Doe 

F. John Doe Joe Shmoe Jane Doe 

Answer:

Explanation: The list will be sorted alphabetically (Lastname / Firstname). first sorted by Lastname if Lastname equals, sorted by firstname Output will be: Jane Doe John Doe Joe Shmoe 

Q28. Given the code fragment: 

What is the result, if the file salesreport.dat does not exist? 

A. Compilation fails only at line 6 

B. Compilation fails only at line 13 

C. Compilation fails at line 6 and 13 

D. Class java.io.IOException 

E. Class java.io.FileNotFoundException 

Answer:

Explanation: 

Compilation fails Line 13 : The resource br of a try-with-resources statement cannot be assignedresources are final in try-with-resources statements 

Q29. Given: What is the result? 

A. Null 

B. class java.lang.ArraylndexOutOfBoundsException 

C. class java.lang.NullPointerException 

D. class java.lang.Exception 

E. Compilation fails. 

Answer:

Explanation: 

error: incompatible types e = new Exception(); required: RuntimeException found: Exception 

Q30. Given: 

What is the result of invoking Car's scop method? 

A. Both vehicles and Motorized's stop methods are invoked. 

B. Vehicles stop method is invoked. 

C. Motorized's stop method is invoked-

D. The implementation of the Car's stop determines the behavior. 

E. Compilation fails. 

Answer:

Explanation: 

The Car class is implementing the methods. Methods are not implemented in interfaces. 

Certleader Dumps
Certleader is a company specialized on providing high quality IT exam materials and fully committed to assist our respected clients crack any IT certification tests on their 1st efforts.