14 lines
348 B
Java
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);
|
|
}
|
|
} ///:~
|