nerdexam
Oracle

1Z0-809 · Question #104

1Z0-809 Question #104: Real Exam Question with Answer & Explanation

Sign in or unlock 1Z0-809 to reveal the answer and full explanation for question #104. The question stem and answer options stay visible for context.

Question

Given:
public interface Moveable<Integer> {
 public default void walk (Integer distance) {
 System.out.println("Walking"));
 }
 public void run(Integer distance);
}
Which statement is true?

Options

  • AMoveable can be used as below: Moveable<Integer> animal = n -> System.out.println("Running" + n); animal.run(100); animal.walk(20);
  • BMoveable can be used as below: Moveable<Integer> animal = n -> n + 10; animal.run(100); animal.walk(20);
  • CMoveable can be used as below: Moveable<Integer> animal = (Integer n) -> System.out.println(n); animal.run(100); Moveable.walk(20);
  • DMoveable cannot be used in a lambda expression.

Unlock 1Z0-809 to see the answer

You've previewed enough free 1Z0-809 questions. Unlock 1Z0-809 for full answers, explanations, the timed quiz mode, progress tracking, and the master PDF. Question stem and options stay visible so you can still see what's on the exam.

Full 1Z0-809 Practice