Consider the following code:
public abstract class Main{ public abstract void m1 (); public abstract void m2 (){ System.out.println ("hello"); } }
Which of the following corrections can be applied to the above code (independently) so that it compiles without any error?
Select 2 options
Correct Options are : A C
A method that has a body cannot be abstract.
In other words, an abstract method cannot have a body.
So either remove the method body (as in m1()) or remove abstract keyword.