What does the following do?
public class Main { interface Printable { boolean print(double angle); } //from w w w. ja va2s. com static void prepare(double angle, Printable t) { boolean ready = t.print(angle); // k1 System.out.println(ready); } public static void main(String[] args) { prepare(45, d => d > 5 || d < -5); // k2 } }
D.
The lambda syntax is incorrect.
It should be ->, not =>.
Option D is correct.
If this was fixed, Option A would be correct.