The particular Actualtests Oracle examine instructions have been playing a more and more natural part in candidates researching life, it save a lot of time for individuals prevent to go to the program. Our own Oracle 1z0-808 places also include many simulator workout routines concerns. The particular simulator workout routines concerns are blended to the Java SE 8 Programmer I solutions in our Oracle 1z0-808 instructions. We assure you that you receive the actual success deffinately providing you work hard with our 1z0-808 accreditation examine supplies. The more you practice the actual Actualtests 1z0-808 places, the higher tag you can attain. It is possible to consider Oracle 1z0-808 publications or perhaps the electronic books anywhere as well as anytime you need in the reason of all of them are easily transportable. Actualtests will assure the actual improve great things about clients due to our high-quality products.

2016 Jul 1z0-808 test questions

Q71. Given the code fragment: 


Which three lines fail to compile? 

A. Line 7 

B. Line 8 

C. Line 9 

D. Line 10 

E. Line 11 

F. Line 12 

Answer: A,D,F 


Q72. Given: 


What would be the output, if it is executed as a program? 

A. name =, pass = 

B. name = null, pass = null 

C. name = null, pass = false 

D. name = null pass = true E. Compile error. 

Answer: C 

Explanation: 

Both name and pass variables are instance variables, and we haven't given them any 

values, so they take their default values. For Boolean default value is false and for string 

which is not a primitive type default is null So at line 7, null will printed as the value of the 

variable name, and at line 8 false will be printed. Hence Option C is correct. 

As explained above options A, B and D are incorrect. 

Code compiles fine so option E is incorrect. 

Reference: 

https://docs.oracle.com/javaseAutorial/java/javaOOAariables.html 


Q73. 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 


Q74. 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 


Q75. Given the code fragment: 

class Student { 

int rollnumber; 

String name; 

List cources = new ArrayList(); 

// insert code here 

public String toString() { 

return rollnumber + " : " + name + " : " + cources; 

And, 

public class Test { 

public static void main(String[] args) { 

List cs = newArrayList(); 

cs.add("Java"); 

cs.add("C"); 

Student s = new Student(123,"Fred", cs); 

System.out.println(s); 

Which code fragment, when inserted at line // insert code here, enables class Test to print 123 : Fred : [Java, C]? 

A. 

private Student(int i, String name, List cs) { 

/* initialization code goes here */ 

B. 

public void Student(int i, String name, List cs) { 

/* initialization code goes here */ 

C. 

Student(int i, String name, List cs) { 

/* initialization code goes here */ 

D. 

Student(int i, String name, ArrayList cs) { 

/* initialization code goes here */ 

Answer: C 

Explanation: 

Incorrect: 

Not A: Student has private access line: Student s = new Student(123,"Fred", cs); 

Not D: Cannot be applied to given types. Line: Student s = new Student(123,"Fred", cs); 


certifyforall.com

Leading 1z0-808 latest exam:

Q76. Given: 


What is the result? 

A. The sum is 2 

B. The sum is 14 

C. The sum is 15 

D. The loop executes infinite times 

E. Compilation fails 

Answer: E 


Q77. Given the code fragments: 


What is the result? 

A. Super Sub Sub 

B. Contract Contract Super 

C. Compilation fails at line n1 

D. Compilation fails at line n2 

Answer: D 


Q78. Given the code fragment: 


Which code fragment prints blue, cyan, ? 


A. Option A 

B. Option B 

C. Option C 

D. Option D 

Answer: A 


Q79. Which statement best describes encapsulation? 

A. Encapsulation ensures that classes can be designed so that only certain fields and methods of an object are accessible from other objects. 

B. Encapsulation ensures that classes can be designed so that their methods are inheritable. 

C. Encapsulation ensures that classes can be designed with some fields and methods declared as abstract. 

D. Encapsulation ensures that classes can be designed so that if a method has an argument MyType x, any subclass of MyType can be passed to that method. 

Answer: A 


Q80. Given: 

public class String1 { 

public static void main(String[] args) { 

String s = "123"; 

if (s.length() >2) 

s.concat("456"); 

for(int x = 0; x <3; x++) 

s += "x"; 

System.out.println(s); 

What is the result? 

A. 123 

B. 123xxx 

C. 123456 

D. 123456xxx 

E. Compilation fails 

Answer: B 

Explanation: 123xxx 

The if clause is not applied. 

Note: Syntax of if-statement: 

if ( Statement ) {