wood burning stoves 2.0*
The moose likes Java in General and the fly likes Adding Elements Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Java in General
Reply locked New topic
Author

Adding Elements

amit bhadre
Ranch Hand

Joined: Jan 23, 2006
Posts: 124
How t add elements of any data type in Stacks,ArrayList,HashTable,HashMap,HashSet, etc of util package?


Thanks advance who ever answers this question.


regards
amit bhadre
Christophe Verré
Sheriff

Joined: Nov 24, 2005
Posts: 14688
    
  16

You can put anything extending the Object class in Collections like ArrayList, Stack... Search the API to know which method to call.


[My Blog]
All roads lead to JavaRanch
Ernest Friedman-Hill
author and iconoclast
Marshal

Joined: Jul 08, 2003
Posts: 24187
    
  34

Please don't post the same question multiple times. If you get an answer you don't like, then provide followup information in the same thread. here is the first time you asked about this. I'm closing this later thread.


[Jess in Action][AskingGoodQuestions]
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Adding Elements