public class Test { public static void main(String[] args) { ClassB b = new ClassB(); System.out.println( b.var1 ); b.method1(); } }