| Author |
using of List for objects
|
kittu basant
Greenhorn
Joined: May 17, 2008
Posts: 11
|
|
Hi, I have an application, where I created a object of a class, used it to set values in 5 different setter methods, Now i have put this 5 different setter methods in a list. But this object creation would be put in to a for loop, since the same setter methods has differnet values set, so i would like to know whether this object creatio has to be put in a list as well. if so how to retreive the values.. a sample would be helpful. regards, kite
|
regards,<br />kittu basant
|
 |
Campbell Ritchie
Sheriff
Joined: Oct 13, 2005
Posts: 32651
|
|
Welcome to JavaRanch. Please check your provate messages. I am afraid I don't understand your question; you ask about putting methods into a List, but you can't add methods to a List, maybe Method objects, but that isn't the same thing. And I don't think you can put your object creation into a List. You can set up an object in a for-loop, you can call all its 5 setter methods, and you can add it to the List, still in the same for-loop, and not necessarily in that order, which I think is what you want.
|
 |
kittu basant
Greenhorn
Joined: May 17, 2008
Posts: 11
|
|
Thank you!! for the reply, My issue is resolved.. To be frank... I Sincerely appreciate this forum and users for the valuable info and help provided within a short period of time to all levels.
|
 |
Rob Spoor
Sheriff
Joined: Oct 27, 2005
Posts: 19216
|
|
"kite bite", Will you please read your private messages as Campbell has requested you to?
|
SCJP 1.4 - SCJP 6 - SCWCD 5
How To Ask Questions How To Answer Questions
|
 |
Campbell Ritchie
Sheriff
Joined: Oct 13, 2005
Posts: 32651
|
|
Originally posted by Rob Prime: "kite bite", Will you please read your private messages as Campbell has requested you to?
Maybe he didn't because I wrote provate messages.
|
 |
Rob Spoor
Sheriff
Joined: Oct 27, 2005
Posts: 19216
|
|
|
Could be. Or he just forgot.
|
 |
Campbell Ritchie
Sheriff
Joined: Oct 13, 2005
Posts: 32651
|
|
More likely thought we don't notice.
|
 |
 |
|
|
subject: using of List for objects
|
|
|