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. prog was understandable wat u gave there,but it no
View Tutorial          By: sailaja at 2009-07-03 02:53:20

2. Thank you for sharing your knowledge. =>
View Tutorial          By: Condel Batac at 2013-02-03 23:17:26

3. great.....
View Tutorial          By: rashid at 2009-12-07 03:22:46

4. I am deveolper in envision .i am interested in scj
View Tutorial          By: shiva kumar at 2013-02-20 05:51:42

5. hai
View Tutorial          By: ayyannan at 2011-01-21 21:27:35

6. hello,
i have completed my bsc(computer sci

View Tutorial          By: Geeta at 2012-07-25 13:35:07

7. i am run code this rectify this error please some
View Tutorial          By: indiran at 2010-01-28 01:45:56

8. Thanks a lot for your tutorial.
(: It was v

View Tutorial          By: Nevermore at 2011-08-03 10:39:32

9. It is an excellent article. Please keep up the goo
View Tutorial          By: sanjay at 2011-03-09 03:17:45

10. This is very clear and explains the concepts in a
View Tutorial          By: Reite at 2011-02-18 13:55:07