Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

size of the list

 
sam liya
Ranch Hand
Posts: 1240
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
can anyone tell me the method to get the size of the ArrayList?
i tried countItems() but eclips IDE gives error when i type that method
 
Anurag Blore
Ranch Hand
Posts: 74
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
ArrayList a = new ArrayList();
a.size();//this will print the size of Array list a.
 
Sagar Rohankar
Ranch Hand
Posts: 2907
1
Java Spring Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
aruna sameera wrote:can anyone tell me the method to get the size of the ArrayList?

Asked Java Docs, If he can helps you !!
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic