wood burning stoves*
The moose likes Beginning Java and the fly likes casting question Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "casting question" Watch "casting question" New topic
Author

casting question

k Oyedeji
Ranch Hand

Joined: Jul 07, 2002
Posts: 96
Hi
I have a hopefully easy question. If i have collection which contains objects of specific type and then i iterate through this collection am i right in saying the iterator will return an object of class Object? Can I then cast the objects back to their original datatypes? is that possible without loosing any variable information?
Thanks
Jon Strayer
Ranch Hand

Joined: Dec 04, 2002
Posts: 133
Yes.


Jon
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: casting question
 
Similar Threads
Passed 151/155
References to an object in multiple collections.
GC
Difference between Java 5 adn Java 1.4
HashMap and HashSet