0 votes
in JAVA by

Object o = () -> {System.out.println(“Example”); }; Object o can be replaced with?

       A. Function f

       B. Runnable r

       C. Consumer c

       D. All the options

1 Answer

0 votes
by

Correct answer is : Runnable r

Object o can be replaced with Runnable r.

Related questions

0 votes
asked Jun 30, 2022 in JAVA by sharadyadav1986
0 votes
0 votes
asked Mar 1, 2023 in JAVA by sharadyadav1986
...