Giray �nver

Greenhorn
+ Follow
since Feb 23, 2004
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Giray �nver

Hi Sridhar,
Because the "piggy(String sName)" method uses just a copy of the string object refrenced by instance variable "static String sName". So any modifications you make on it (in piggy method), does not affect the actual object.
You may consider giving a return type to the piggy method and changing the code in your main method accordingly.
Rgds.