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()); } }