Cause all that matters here is passing the Oracle 1z0 808 java se 8 programmer i exam. Cause all that you need is a high score of java se 8 programmer i 1z0 808 dumps Java SE 8 Programmer I exam. The only one thing you need to do is downloading Ucertify java se 8 programmer i 1z0 808 exam study guides now. We will not let you down with our money-back guarantee.

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


Q92. Given: 

A. X XX 

B. X Y X 

C. Y Y X 

D. Y YY 

Answer:


Q93. Given: 

What is the result? 

A. 200.0 : 100.0 

B. 400.0 : 200.0 

C. 400.0 : 100.0 

D. Compilation fails. 

Answer:


Q94. Given: 

class MarksOutOfBoundsException extends IndexOutOfBoundsException { } 

public class GradingProcess { 

void verify(int marks) throws IndexOutOfBoundsException { 

if (marks > 100) { 

throw new MarksOutOfBoundsException(); 

if (marks > 50) { 

System.out.print("Pass"); 

} else { 

System.out.print("Fail"); 

public static void main(String[] args) { 

int marks = Integer.parseInt(args[2]); 

try { 

new GradingProcess().verify(marks)); 

} catch(Exception e) { 

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

And the command line invocation: 

Java grading process 89 50 104 

What is the result? 

A. Pass 

B. Fail 

C. Class MarketOutOfBoundsException 

D. Class IndexOutOfBoundsException 

E. Class Exception 

Answer:

Explanation: The value 104 will cause a MarketOutOfBoundsException 


Q95. Given the code fragment: 

Which modification enables the code to print 54321? 

A. Replace line 6 with System, out. print (--x) ; 

B. At line 7, insert x --; 

C. Replace line 6 with --x; and, at line 7, insert system, out. print (x); 

D. Replace line 12 With return (x > 0) ? false: true; 

Answer:


Q96. Given: 

What is the result? 

A. Option A 

B. Option B 

C. Option C 

D. Option D 

Answer:


Q97. Given: 

class Sports { 

int num_players; 

String name, ground_condition; 

Sports(int np, String sname, String sground){ 

num_players = np; 

name = sname; 

ground_condition = sground; 

class Cricket extends Sports { 

int num_umpires; 

int num_substitutes; 

Which code fragment can be inserted at line //insert code here to enable the code to compile? 

A. Cricket() { 

super(11, "Cricket", "Condidtion OK"); 

num_umpires =3; 

num_substitutes=2; 

B. Cricket() { 

super.ground_condition = "Condition OK"; 

super.name="Cricket"; 

super.num_players = 11; 

num_umpires =3; 

num_substitutes=2; 

C. Cricket() { 

this(3,2); 

super(11, "Cricket", "Condidtion OK"); 

Cricket(int nu, ns) { 

this.num_umpires =nu; 

this.num_substitutes=ns; 

D. Cricket() { 

this.num_umpires =3; 

this.num_substitutes=2; 

super(11, "Cricket", "Condidtion OK"); 

Answer:

Explanation: 

Incorrect: 

not C, not D: call to super must be the first statement in constructor. 


Q98. Which two are valid array declaration? 

A. Object array[]; 

B. Boolean array[3]; 

C. int[] array; 

D. Float[2] array; 

Answer: A,C 


Q99. Given: 

Which inserted at line 11, will provide the following output? 

[21, 15, 11] 

A. list.removelf(e > e%2 != 0); 

B. list.removelf(e -> e%2 != 0); 

C. Ust.removelf(e -> e%2 = 0); 

D. list.remove(e -> e%2 = 0); 

E. None of the above. 

Answer:

Explanation: 

In output we can see that only odd numbers present, so we need to remove only even numbers to get expected output. From Java SE 8, there is new method call removelf which takes predicate object and remove elements which satisfies predicate condition. Predicate has functional method call take object and check if the given condition met or not, if met it returns true, otherwise false. Option C we have passed correct lambda expression to check whether the number is odd or even that matches to the functional method of predicate interface. Option A is incorrect as it is invalid lambda expression. Option B is incorrect as it removes all odd numbers. Option D is incorrect as there is no remove method that takes predicate as argument. https://docs.oracle.eom/javase/8/docs/api/java/util/ArrayList.html 


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