Source of PassReferences.java


  1: //: appendixa:PassReferences.java
  2: // From 'Thinking in Java, 2nd ed.' by Bruce Eckel
  3: // www.BruceEckel.com. See copyright notice in CopyRight.txt.
  4: // Passing references around.

  6: public class PassReferences {
  7:   static void f(PassReferences h) {
  8:     System.out.println("h inside f(): " + h);
  9:   }
 10:   public static void main(String[] args) {
 11:     PassReferences p = new PassReferences();
 12:     System.out.println("p inside main(): " + p);
 13:     f(p);
 14:   }
 15: } ///:~