Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
JavaRanch.com/granny.jsp
Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How To Manually Set JavaBean Values to Create a Collection?

 
JiaPei Jen
Ranch Hand
Posts: 1309
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ladies and Gentlemen, I did some work. How about what I come up with below. I have a Java class that supplies data manually and creates a Collection of beans. And I define a JavaBean in another class.

Am I on the right track to manually code data into a Collection of beans?

and my JavaBean looks like:

[ August 30, 2005: Message edited by: JiaPei Jen ]
 
Jeyakumar Balasubramanian
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This is somewhat ok.

Declare the 2 members of bean as private and make the following changes in bold in ur code.

 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic