Hi sunetra,
I totally disagree with raj.
Remember everything in java is pass by value.
1. For primitives like int, short, double it is pass by value.
eg: int a=5;
somemethod(a); // here you are passing a copy of a's value to somemethod.
2. Even for object references, it pass by value.
eg: A a = new A(); // object a is created.
somemethod(a); // here you are passing a copy of referece to somemethod.
Raj plz understand java is only pass by value, and there is no point of pass by reference.
Thanks,
Good guy.
[ EJFH: Removed invitation to take discussion off line ]
[ April 19, 2005: Message edited by: Ernest Friedman-Hill ]