private class Base {} public class Vis { transient int iVal; public static void main (String args []){ } } The compiler complains about the access modifier in the Base Class. They have no inheritance relation and they are in the same package (as if it compile the .class files would be created in the same directory). thnks