OnJava8-Examples/references/PassReferences.java
2015-05-05 11:20:13 -07:00

14 lines
348 B
Java

//: references/PassReferences.java
// Passing references around.
public class PassReferences {
public static void f(PassReferences h) {
System.out.println("h inside f(): " + h);
}
public static void main(String[] args) {
PassReferences p = new PassReferences();
System.out.println("p inside main(): " + p);
f(p);
}
} ///:~