Java SE 8 Programmer II — Question 142

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

Answer options

Correct answer: A

Explanation

Option A is correct because it properly implements the Moveable interface with a lambda expression for the run method while using the default walk method. Options B and C do not comply with the method signatures defined in the interface, and option D is incorrect since the Moveable interface can be utilized in a lambda expression.