File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

mutator method

 
SrinivasaRao Swarna
Greenhorn
Posts: 20
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi friends,

I have doubt with instantmethods



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


Thanks&Regards
Srinivas
[ June 03, 2008: Message edited by: Campbell Ritchie ]
 
Vikas Kapoor
Ranch Hand
Posts: 1374
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Sheriff
Pie
Posts: 47232
52
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic