interface A{
void setColor(int color);
}
abstract class B implements A{
abstract int setColor(int color);
}
class Test extends B{
public static void main(Strings args){
int setColor(int color){ }
}
}
this is showing the compile time error of
';' expected
int setColor(int color){
}
above program is wrong my actual program is
interface A{
void setColor(int color);
}
abstract class B implements A{
abstract int setColor(int color);
}
class Test extends B{
int setColor(int color){ }
public static void main(Strings args){
}
}
in this program i am having the compilation error which i have mentioned in the comment section
You’re trying to declare a method inside
main. Put the definition ofsetColoroutsidemain!