Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

arraylist

 
Duray Rajesh
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 781
Java Netbeans IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Check out autoboxing - http://java.sun.com/j2se/1.5.0/docs/guide/language/autoboxing.html
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic