Question: Analyze the following code: ` ` ` public class Test { public static void main ( String [ ] args ) { Test test =
Analyze the following code:
public class Test
public static void mainString args
Test test new Test;
test.setAction System.out.printAction ;
public void setActionT t
tm;
interface T
public void m;
public void m;
The program has a compile error because T is not a functional interface. T contains multiple methods.
The program displays Action
The program would work if you delete the method m from the interface T
The program has a runtime error because T is not a functional interface. T contains multiple methods.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
