I get the error below when i try to compile this program. Can some one tell me what am i doing wrong and how should i fix the error?
test2() in
testing cannot implement test2() in I1; attempting to assign weaker access privileges; was public
void test2(){
^
1 error
abstract class A1{
abstract void test();
}
abstract class A2 extends A1{
}
interface I1{
void test2() ;
}
class testing extends A2 implements I1{
void test(){
System.out.println("HELLO THERE FROM TEST1");
}
void test2(){
System.out.println("HELLO THERE FROM TEST2");
}
}
public class AbsExample1{
public static void main(
String[] args){
testing one=new testing();
one.test();
one.test2();
System.out.println("accessing main");
}
}