Question: Identify the error(s) in the program and describe why this error occurs. Rewrite the code after correcting all errors. package midProgs; interface MyInt{ int a;
Identify the error(s) in the program and describe why this error occurs. Rewrite the code after correcting all errors.
package midProgs;
interface MyInt{
int a;
void seta(int alpha);
}
public class CheckTest implements MyInt {
@Override
public void seta(int alpha) {a = alpha;}
public static void main(String[] args) {
seta(5);
}
}
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
