Go Back on 1z0-809 Exam
Available in 1, 3, 6 and 12 Months Free Updates Plans
PDF: $15 $60

Test Engine: $20 $80

PDF + Engine: $25 $99

1z0-809 Practice Test


Page 8 out of 26 Pages

The protected modifier on a Field declaration within a public class means that the field
______________.


A.

Cannot be modified


B.

Can be read but not written from outside the class


C.

Can be read and written from this class and its subclasses only within the same
package


D.

Can be read and written from this class and its subclasses defined in any package





D.
  

Can be read and written from this class and its subclasses defined in any package



http://beginnersbook.com/2013/05/java-access-modifiers/

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.





A.
  

Compilation fails.



Which statement is true about the single abstract method of the java.util.function.Function
interface?


A.

It accepts one argument and returns void.


B.

It accepts one argument and returns boolean.


C.

It accepts one argument and always produces a result of the same type as the
argument.


D.

It accepts an argument and produces a result of any data type





C.
  

It accepts one argument and always produces a result of the same type as the
argument.



Reference: http://winterbe.com/posts/2014/03/16/java-8-tutorial/ (functions)

Given:
public final class IceCream {
public void prepare() {}
}
public class Cake {
public final void bake(int min, int temp) {}
public void mix() {}
}
public class Shop {
private Cake c = new Cake ();
private final double discount = 0.25;
public void makeReady () { c.bake(10, 120); }
}
public class Bread extends Cake {
public void bake(int minutes, int temperature) {}
public void addToppings() {}
Which statement is true?


A.

A compilation error occurs in IceCream.


B.

A compilation error occurs in Cake.


C.

A compilation error occurs in Shop.


D.

A compilation error occurs in Bread


E.

All classes compile successfully.





D.
  

A compilation error occurs in Bread



Given:

What is the result?


A.

Marrown
String out of limits
JesOran


B.

Marrown
String out of limits
Array out of limits


C.

Marrown
String out of limits


D.

Marrown
NanRed
JesOran





A.
  

Marrown
String out of limits
JesOran




Page 8 out of 26 Pages
Previous