aspose file tools*
The moose likes Java in General and the fly likes arraylist Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Java in General
Bookmark "arraylist" Watch "arraylist" New topic
Author

arraylist

Duray Rajesh
Greenhorn

Joined: Jun 16, 2006
Posts: 12
hi,
i have a doubt in the following program
psvmain()
{
ArrayList a=new ArrayList();
a.add(1);
sop(a);
}
output:1;
how arraylist is accepting value like 1, 1.5.,
James Sabre
Ranch Hand

Joined: Sep 07, 2004
Posts: 781

Check out autoboxing - http://java.sun.com/j2se/1.5.0/docs/guide/language/autoboxing.html


Retired horse trader.
 Note: double-underline links may be advertisements automatically added by this site and are probably not endorsed by me.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: arraylist