Comment on Tutorial - How to use ArrayList in Java By Hong



Comment Added by : Venus

Comment Added at : 2011-02-11 09:09:55

Comment on Tutorial : How to use ArrayList in Java By Hong
Thanks, I understand the add function better now (found out it will expand the size as it needs).

However, I noticed that you didn't set the capacity of ArrayList al during the initiation. According to the API, the default size of an ArrayList is 10. But on your output, it says 0, are you sure nothing is missing on the code?

Thanks again


View Tutorial



Subscribe to Tutorials

Related Tutorials

Program using concept of byte long short and int in java

Update contents of a file within a jar file

Tomcat and httpd configured in port 8080 and 80

Java File

Java String

Count number of vowels, consonants and digits in a String in Java

Reverse a number in Java

Student marks calculation program in Java

Handling Fractions in Java

Calculate gross salary in Java

Calculate average sale of the week in Java

Vector in Java - Sample Program

MultiLevel Inheritance sample in Java

Multiple Inheritance sample in Java

Java program using Method Overriding

Archived Comments

1. Hi,

Your COM port is currently in u

View Tutorial          By: Ramlak at 2008-04-14 07:29:55

2. int m,m2,n,n2;
for( m=0 , m2=0 ; m<

View Tutorial          By: muhammad abdullah at 2012-10-11 05:27:02

3. Error...!!
please send correct java code fo

View Tutorial          By: mayuri at 2013-10-20 13:26:30

4. good
View Tutorial          By: yeoh at 2009-04-18 21:32:36

5. man i really havnt got your last example. how it g
View Tutorial          By: rakesh at 2013-02-21 08:20:29

6. hello,thanx its really great
View Tutorial          By: sadhana at 2011-08-05 09:35:00

7. Hello! May I know where is the "main" fu
View Tutorial          By: Angelia at 2009-06-25 18:54:28

8. hellow my name is samer, i have a project of final
View Tutorial          By: samer flayha at 2011-08-17 09:37:16

9. Very nice article. Really liked the way it took me
View Tutorial          By: Sandeep at 2010-01-10 09:58:25

10. i want ask whether how do i run the application?
View Tutorial          By: unknown at 2009-10-29 21:13:03