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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!