// Parameter passing demonstration 	
	
import java.awt.*;	
	
public class PassingReferences {	
	// f(): set the value of the formal parameter 	
	public static void f(Point v) {	
		v = new Point(0, 0);	
	}	
	
	// g(): modifies the contents of the referred to object 	
	public static void g(Point v) {	
		v.setLocation(0, 0);	
	}	
	
	// main(): application entry point	
	public static void main(String[] args) {	
		Point p = new Point(10, 10);	
		System.out.println(p);	
	
		f(p);	
		System.out.println(p);	
	
		g(p);	
		System.out.println(p);	
	}	
}	
