Tips for exam 1z0 808

we provide Virtual Oracle 1z0 808 book pdf exam which are the best for clearing 1z0 808 practice test test, and to get certified by Oracle Java SE 8 Programmer I. The 1z0 808 book Questions & Answers covers all the knowledge points of the real 1z0 808 dumps exam. Crack your Oracle 1z0 808 practice test Exam with latest dumps, guaranteed!

2017 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.certleader.com/1z0-808-dumps.html

Q11. Given the following code for the classes MyException and Test: 

What is the result? 

A. A 

B. B 

C. Either A or B 

D. A B 

E. A compile time error occurs at line n1 

Answer:

Q12. Given: 

What is the result? 

A. int main 1 

B. Object main 1 

C. String main 1 

D. Compilation fails 

E. An exception is thrown at runtime 

Answer:

Q13. Given: 

What is the output? 

A. [21, 13, 11] 

B. [30] 

C. [] 

D. Compilation fails due to error at line 7 

E. Compilation tails due to error at line 10 

Answer:

Explanation: 

Option D is the correct answer. 

Code fails to compile as we can't use primitive for collections type, so in this code trying to 

use int at line 7, causes a compile error. We should have use wrapper. Integer there. So 

option D is correct. 

https://docs.oracle.eom/javase/8/docs/api/java/util/ArrayList.html 

Q14. Given the code fragment: 

What is the result if the integer aVar is 9? 

A. 10 Hello World! 

B. Hello Universe! 

C. Hello World! 

D. Compilation fails. 

Answer:

Q15. Given the code fragment: 

StringBuilder sb = new StringBuilder ( ) ; 

Sb.append (“world”); 

Which code fragment prints Hello World? 

A. sb.insert(0,"Hello "); 

System.out.println(sb); 

B. sb.append(0,"Hello "); 

System.out.println(sb); 

C. sb.add(0,"Hello "); 

System.out.println(sb); 

D. sb.set(0,"Hello "); 

System.out.println(sb);D 

Answer:

Explanation: The java.lang.StringBuilder.insert(int offset, char c) method inserts the string representation of the char argument into this sequence. The second argument is inserted into the contents of this sequence at the position indicated by offset. The length of this sequence increases by one.The offset argument must be greater than or equal to 0, and less than or equal to the length of this sequence. 

Reference: Java.lang.StringBuilder.insert() Method 

Q16. Given the fragment: 

What is the result? 

A. 13480.0 

B. 13480.02 

C. Compilation fails 

D. An exception is thrown at runtime 

Answer:

Q17. Given the code fragment: 

What is the result? 

A. 28false29 true 

B. 285 < 429 true 

C. true true 

D. compilation fails 

Answer:

Q18. Given: 

What is the result? 

A. 120 

B. 120D 

C. A NumberFormatException will be thrown. 

D. Compilation fails due to error at line 5. 

E. Compilation tails due to error at line 8. 

Answer:

Explanation: 

At line 5, we have created a wrapper object of double by passing 120D, which is convertible to a Double, so there won't be any exception there. But if you check carefully, you can see the variable number is declared inside try block, so the scope of the variable number is limited to that block, so trying to access it outside causes a compile time error. httpsy/docs.oracle.com/javase/tutorial/iava/nutsandbolts/variables.html 

Q19. 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:

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); 

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

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.