Given:
public interface Moveable<Integer> {
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<Integer> animal = n - > System.out.println("Running" + n); animal.run(100); animal.walk(20);
Moveable can be used as below:
B.
Moveable<Integer> animal = n - > n + 10;
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.
thetech
Highly Voted 4 years, 8 months agoasdfjhfgjuaDCV
Most Recent 4 months, 3 weeks ago