| |
3.4.2.If a member of its superclass is declared public, the subclass inherits that member |
|
package cert;
public class MainClass {
public String doMainClassThings() {
return "fun";
}
}
package notcert; //Not the package MainClass is in
import cert.MainClass;
class Cloo extends MainClass {
public void testCloo() {
System.out.println(doMainClassThings());
}
}
|
|
|