Exemple #1
0
  public static void main(String args[])
    { int k = 100; 
      B b3 = new B(
	   3+k, 
	   4+k);
      B b2 = new B(
	    2 + k);
      B b1 = new B();
      b1.foo(3);
      try {
	int x = b2.foo(4) / 0;
      }
      catch (Exception e)
      { System.out.println("                         " +    e);
      }
    }
  public static void main(String[] args) {
    B b;
    int rv;
    b = new B();
    System.out.println(5555);
    rv = b.foo();

    System.out.println(rv);
  }
Exemple #3
0
 void test() {
   new A(); // invokespecial - <init>   --> A.init
   super.foo(); // invokespecial - super    --> B.foo
   bar(); // invokespecial - private  --> C.bar
   foo(); // invokevirtual            --> C.foo
 }
 void bar(B b) {
     b.foo(1, 2)
 }