Point Checklist: java se 8 programmer i 1z0 808 dumps

Exam Code: 1z0 808 java se 8 programmer i (Practice Exam Latest Test Questions VCE PDF)
Exam Name: Java SE 8 Programmer I
Certification Provider: Oracle
Free Today! Guaranteed Training- Pass 1z0 808 book Exam.


♥♥ 2021 NEW RECOMMEND ♥♥

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

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

Free Instant Download NEW 1z0-808 Exam Dumps (PDF & VCE):
Available on: http://www.surepassexam.com/1z0-808-exam-dumps.html

Q121. A method is declared to take three arguments. A program calls this method and passes only two arguments. What is the results? 

A. Compilation fails. 

B. The third argument is given the value null. 

C. The third argument is given the value void. 

D. The third argument is given the value zero. 

E. The third argument is given the appropriate falsy value for its declared type. F) An 

exception occurs when the method attempts to access the third argument. 

Answer:


Q122. Which two statements correctly describe checked exception? 

A. These are exceptional conditions that a well-written application should anticipate and recover from. 

B. These are exceptional conditions that are external to the application, and that the application usually cannot anticipate or recover from. 

C. These are exceptional conditions that are internal to the application, and that the application usually cannot anticipate or recover from. 

D. Every class that is a subclass of RuntimeException and Error is categorized as checked exception. 

E. Every class that is a subclass of Exception, excluding RuntimeException and its subclasses, is categorized as checked exception. 

Answer: B,D 

Explanation: Checked exceptions: 

* (B) represent invalid conditions in areas outside the immediate control of the program (invalid user input, database problems, network outages, absent files) 

* are subclasses of Exception It's somewhat confusing, but note as well that RuntimeException (unchecked) is itself a subclass of Exception (checked). 

* a method is obliged to establish a policy for all checked exceptions thrown by its implementation (either pass the checked exception further up the stack, or handle it somehow) 

Reference: Checked versus unchecked exceptions 


Q123. Given: 

What is the result? 

A. 10 : 22 : 20 

B. 10 : 22 : 22 

C. 10 : 22 : 6 

D. 10 : 30 : 6 

Answer:


Q124. Given: 

public class Test { 

public static void main(String[] args) { 

try { 

String[] arr =new String[4]; 

arr[1] = "Unix"; 

arr[2] = "Linux"; 

arr[3] = "Solarios"; 

for (String var : arr) { 

System.out.print(var + " "); 

} catch(Exception e) { 

System.out.print (e.getClass()); 

What is the result? 

A. Unix Linux Solaris 

B. Null Unix Linux Solaris 

C. Class java.lang.Exception 

D. Class java.lang.NullPointerException 

Answer:

Explanation: null Unix Linux Solarios 

The first element, arr[0], has not been defined. 


Q125. Given: 

Which code fragment should you use at line n1 to instantiate the dvd object successfully? 

A. Option A 

B. Option B 

C. Option C 

D. Option D 

Answer:


Q126. Given the code fragment: 

Which three code fragments can be independently inserted at line nl to enable the code to print one? 

A. Byte x = 1; 

B. short x = 1; 

C. String x = "1"; 

D. Long x = 1; 

E. Double x = 1; 

F. Integer x = new Integer ("1"); 

Answer: A,B,F 


Q127. Which two actions will improve the encapsulation of a class? 

A. Changing the access modifier of a field from public to private 

B. Removing the public modifier from a class declaration 

C. Changing the return type of a method to void 

D. Returning a copy of the contents of an array or ArrayList instead of a direct reference 

Answer: A,D 

Reference: http://www.tutorialspoint.com/java/java_access_modifiers.htm 


Q128. Class StaticField { 

static int i = 7; 

public static void main(String[] args) { 

StaticFied obj = new StaticField(); 

obj.i++; 

StaticField.i++; 

obj.i++; 

System.out.println(StaticField.i + " "+ obj.i); 

What is the result? 

A. 10 10 

B. 8 9 

C. 9 8 

D. 7 10 

Answer:


Q129. Given: 

public class App { // Insert code here System.out.print("Welcome to the world of Java"); } } 

Which two code fragments, when inserted independently at line // Insert code here, enable the program to execute and print the welcome message on the screen? 

A. static public void main (String [] args) { 

B. static void main (String [] args) { 

C. public static void Main (String [] args) { 

D. public static void main (String [] args) { 

E. public void main (String [] args) { 

Answer: A,D 

Explanation: 

Incorrect: 

Not B: No main class found. 

Not C: Main method not found 

not E: Main method is not static. 


Q130. Which three statements describe the object-oriented features of the Java language? 

A. Objects cannot be reused. 

B. A subclass can inherit from a superclass. 

C. Objects can share behaviors with other objects. 

D. A package must contain more than one class. 

E. Object is the root class of all other objects. 

F. A main method must be declared in every class. 

Answer: B,C,E