File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Beginning Java and the fly likes Java Collection Questions Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Java Collection Questions" Watch "Java Collection Questions" New topic
Author

Java Collection Questions

Sailendra Jena
Greenhorn

Joined: Aug 30, 2010
Posts: 9

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
Saloon Keeper

Joined: Aug 16, 2005
Posts: 14116
    
  16

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: 9

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: 18541
    
    8

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
Saloon Keeper

Joined: Aug 16, 2005
Posts: 14116
    
  16

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!).
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Java Collection Questions