High value of 1z0-808 exam engine materials and pdf for Oracle certification for IT learners, Real Success Guaranteed with Updated 1z0-808 pdf dumps vce Materials. 100% PASS Java SE 8 Programmer I exam Today!

2021 May 1z0-808 Study Guide Questions:

Q61. Given the classes: 

* AssertionError 

* ArithmeticException 

* ArrayIndexOutofBoundsException 

* FileNotFoundException 

* IllegalArgumentException 

* IOError 

* IOException 

* NumberFormatException 

* SQLException 

Which option lists only those classes that belong to the unchecked exception category? 

A. AssertionError, ArrayIndexOutOfBoundsException, ArithmeticException 

B. AssertionError, IOError, IOException 

C. ArithmeticException, FileNotFoundException, NumberFormatException 

D. FileNotFoundException, IOException, SQLException 

E. ArrayIndexOutOfBoundException, IllegalArgumentException, FileNotFoundException 

Answer: A 

Explanation: Not B: IOError and IOException are both checked errors. 

Not C, not D, not E: FileNotFoundException is a checked error. 


Checked exceptions: 

* 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 

* 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 



Unchecked exceptions: 

* represent defects in the program (bugs) - often invalid arguments passed to a non-private method. To quote from The Java Programming Language, by Gosling, Arnold, and Holmes: "Unchecked runtime exceptions represent conditions that, generally speaking, reflect errors in your program's logic and cannot be reasonably recovered from at run time." 

* are subclasses of RuntimeException, and are usually implemented using IllegalArgumentException, NullPointerException, or IllegalStateException 

* method is not obliged to establish a policy for the unchecked exceptions thrown by its implementation (and they almost always do not do so) 

Q62. Given: 

public class TestLoop { 

public static void main(String[] args) { 

int array[] = {0, 1, 2, 3, 4}; 

int key = 3; 

for (int pos = 0; pos < array.length; ++pos) { 

if (array[pos] == key) { 


System.out.print("Found " + key + "at " + pos); 

What is the result? 

A. Found 3 at 2 

B. Found 3 at 3 

C. Compilation fails 

D. An exception is thrown at runtime 

Answer: C 

Explanation: The following line does not compile: System.out.print("Found " + key + "at " + pos); 

The variable pos is undefined at this line, as its scope is only valid in the for loop. Any variables created inside of a loop are LOCAL TO THE LOOP. 

Q63. Given the code fragment: 

Which code fragment prints blue, cyan, ? 

A. Option A 

B. Option B 

C. Option C 

D. Option D 

Answer: A 


Up to the immediate present 1z0-808 study guide:

Q64. Given the following class: 

And given the following main method, located in another class: 

Which three lines, when inserted independently at line n1, cause the program to print a o balance? 

A. this.amount = 0; 

B. amount = 0; 

C. acct (0) ; 

D. acct.amount = 0; 

E. acct. getAmount () = 0; 

F. acct.changeAmount(0); 

G. acct.changeAmount(-acct.amount); 

H. acct.changeAmount(-acct.getAmount()); 

Answer: D,G,H 

Q65. Given: 

public class ScopeTest { 

int j, int k; 

public static void main(String[] args) { 

ew ScopeTest().doStuff(); } 

void doStuff() { 

nt x = 5; 



void doStuff2() { 

nt y = 7; 


or (int z = 0; z < 5; z++) { 



Which two items are fields? 

A. j 

B. k 

C. x 

D. y 

E. z 

Answer: A,B 

Q66. Given: 

What is the result? 

A. Good Day! Good Luck! 

B. Good Day! Good Day! 

C. Good Luck! Good Day! 

D. Good Luck! Good Luck! 

E. Compilation fails 

Answer: E 


Precise 1z0-808 preparation exams:

Q67. Which three are advantages of the Java exception mechanism? 

A. Improves the program structure because the error handling code is separated from the normal program function 

B. Provides a set of standard exceptions that covers all the possible errors 

C. Improves the program structure because the programmer can choose where to handle exceptions 

D. Improves the program structure because exceptions must be handled in the method in which they occurred 

E. Allows the creation of new exceptions that are tailored to the particular program being created 

Answer: A,C,E 

Q68. Given: 

class Overloading { 

int x(double d) { 


return 0; 

String x(double d) { 


return null; 

double x(double d) { 


return 0.0; 

public static void main(String[] args) { 

new Overloading().x(4.0); 

What is the result? 

A. One 

B. Two 

C. Three 

D. Compilation fails. 

Answer: D 

Q69. Given: 

And the commands: 

Javac Test.java 

Java Test 12345 

What is the result? 

A. Number us : 12345 

B. A NullPointerException is thrown at runtime 

C. A NumberFormatException is thrown at runtime 

D. AnArrayIndexOutOfBoundException is thrown at runtime. 

Answer: A 

Q70. Given: 

What is the output? 

A. 2015-03-27 

B. 2015-04-27 

C. 2015-02-27 D. Compilation fails due to error at line 6. 

E. Compilation fails due to error at line 8. 

Answer: A 


To create we have used following method with LocalDate class; 

public static LocalDate of(intyear, int month, int dayOfMonth) 

Here we need to remember that month is not zero based so if you pass 1 for month, then 

month will be January. 

Then we have used period object of 1 day and add to date object which makes current date 

to next day, so final output is 2015-03-27. Hence option A is correct.