fork download
  1. class Main {
  2. public static void main (String[] args) throws java.lang.Exception {
  3. new B().test();
  4. }
  5. }
  6.  
  7. class A {
  8. public int test = 42;
  9. }
  10.  
  11. class B extends A {
  12. public void test() {
  13. System.out.println(this.test);
  14. }
  15. }
Success #stdin #stdout 0.07s 2841600KB
stdin
Standard input is empty
stdout
42