File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Beginning Java and the fly likes size of the list Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "size of the list" Watch "size of the list" New topic

size of the list

sam liyanage
Ranch Hand

Joined: Nov 25, 2008
Posts: 1073
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

Joined: Jan 15, 2003
Posts: 74
ArrayList a = new ArrayList();
a.size();//this will print the size of Array list a.
Sagar Rohankar
Ranch Hand

Joined: Feb 19, 2008
Posts: 2902

aruna sameera wrote:can anyone tell me the method to get the size of the ArrayList?

Asked Java Docs, If he can helps you !!
I agree. Here's the link:
subject: size of the list
Similar Threads
How can I increase the size of a Font?
object size
Enumeration infinitely looping
start type
java array assignmebts