| Author |
Java Collection Questions
|
Sailendra Jena
Greenhorn
Joined: Aug 30, 2010
Posts: 8
|
|
suppose a class name is Employee as below examples
here we passing 1000 of employees name only through the object of this class to an ArrayList list=--------------------.Tell me the answer when i will get the name of all employee from the object of the ArrayList i.e through list object?
|
sailendra.n.jena@hotmail.com
|
 |
Jesper de Jong
Java Cowboy
Bartender
Joined: Aug 16, 2005
Posts: 12952
|
|
Welcome to JavaRanch.
Can you please explain more clearly what your question is?
If your Employee class looks exactly like you posted, it's not of much use. You have a private member variable name but there is no way to get or set the value of that member variable.
|
Java Beginners FAQ - JavaRanch SCJP FAQ - The Java Tutorial - Java SE 7 API documentation
Scala Notes - My blog about Scala
|
 |
Sailendra Jena
Greenhorn
Joined: Aug 30, 2010
Posts: 8
|
|
HI
My question is that suppose i am entering 1000 employee name through this class which is directly store inside the ArrayList list object just like as Collection API's ArrayList. Similar to that but only difference is that when i am entering through this class it will store to that ArrayList object.So my question is that how i will access that all employee name through this ArrayList object reference.
|
 |
Paul Clapham
Bartender
Joined: Oct 14, 2005
Posts: 16487
|
|
When someone asks you to explain your question more clearly, that doesn't mean to just copy what you said before. On the contrary, it asks you to post something different. Something more understandable. Your question was impossible to understand the first time, and repeating it didn't make it any easier to understand.
I would suggest for a start posting meaningful code. And then asking a meaningful question about that code. So far you haven't done either of those things.
Also it's possible that you can't express yourself in English well enough. You might consider asking somebody with better English skills to help you out if that is true.
|
 |
Jesper de Jong
Java Cowboy
Bartender
Joined: Aug 16, 2005
Posts: 12952
|
|
|
If you're not familiar with Java collection classes, you can find a very good tutorial here: The Java Tutorials - Collections (this was written by Josh Bloch - he is the one who originally invented and implemented the Java collections API!).
|
 |
 |
|
|
subject: Java Collection Questions
|
|
|