I Have following two classes: Test.java
package com.test.app;
public class Test {
public int a=10;
protected void testFunc() {
// TODO Auto-generated method stub
System.out.println("Test class--> testFunc");
}
}
Another One is Main.java package com.test.main;
import com.test.app.Test;
public class Main extends Test {
public static void main(String[] argv) {
System.out.println("Main Method");
Main main =new Main();
main.testFunc(); // No Error
Test test = new Test();
test.testFunc(); // Error
}
}
The method test.testFunc() from the type Test is not visible