Given:
public interface Moveable
public default void walk (Integer distance) {System.out.println("Walking");) public void run(Integer distance);
}
Which statement is true?
Moveable can be used as below:
A.
Moveable
Moveable can be used as below:
B.
Moveable
animal.run(100);
animal.walk(20);
Moveable can be used as below:
C.
Moveable animal = (Integer n) - > System.out.println(n);
animal.run(100);
Moveable.walk(20);
Movable cannot be used in a lambda expression.
D.