This week's book giveaways are in the Java EE and JavaScript forums.
We're giving away four copies each of The Java EE 7 Tutorial Volume 1 or Volume 2(winners choice) and jQuery UI in Action and have the authors on-line!
See this thread and this one for details.
The moose likes Beginning Java and the fly likes mutator method Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "mutator method" Watch "mutator method" New topic

mutator method

SrinivasaRao Swarna

Joined: Sep 17, 2006
Posts: 20
Hi friends,

I have doubt with instantmethods

in this program having erro in main method at dotted line please me

[ June 03, 2008: Message edited by: Campbell Ritchie ]
Vikas Kapoor
Ranch Hand

Joined: Aug 16, 2007
Posts: 1374
Hello Sri,

Always copy and paste your code from original location. You have made many mistakes while rewriting in this post.

The potential error that i could see is you haven't type cast from Object to person class.

Is this the actual problem?
Campbell Ritchie

Joined: Oct 13, 2005
Posts: 38474
Vishal Pandya is correct about copy and paste; your modify method returns an Object which needs to be cast to person.

And always use code tags round quoted code; I have added them so you can see how much easier the code is to read.
jQuery in Action, 2nd edition
subject: mutator method