Example #1
1
  public static void main(String as[]) {

    Hello h = new Hello();
    Hello h1 = new Hello();
    Hello h2 = new Hello();
    Hello h3 = new Hello();
    System.runFinalization();
    System.gc();
    System.out.println("GC1");
    h.m1();
    h.m2();
    Hai hai = new Hai();
    hai = null;
    Hai hai1 = new Hai();
    hai1 = hai;
    System.runFinalization();
    System.gc();

    /*
    A a=new A();
    a.show();
    System.runFinalization();
    System.gc();
    */
  }
Example #2
0
  public static void main(String[] args) {
    Hello h = new Hello();
    /*int p=1;
    int q=2;
    int r=3;
    int s=4;
    h.m1();
    h.m1(p,q);
    h.m1(p,q,r);
    h.m1(p,q,r,s); */

    byte a = 1;
    byte b = 2;
    byte c = 3;
    byte d = 4;
    h.m1();
    h.m1(a, b);
    h.m1(a, b, c);
    h.m1(a, b, c, d);
  }
 public static void main(String as[]) {
   Hello h = new Hello();
   int a = 100;
   System.out.println(a);
   h.m1(a);
   System.out.println(a);
   Hai hai = new Hai();
   System.out.println(hai.x);
   h.m2(hai);
   System.out.println(hai.x);
 }