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. I know core java jsp and sql. I want to retrieve d
View Tutorial          By: Vinoth at 2011-08-16 07:22:15

2. Nice example for FileReader and FileWriter,

View Tutorial          By: Tim at 2009-10-21 17:31:00

3. i have run the code successfully but it does not s
View Tutorial          By: amrish at 2010-12-11 07:00:28

4. I run the code . It's good.
View Tutorial          By: Golam Rabbi at 2011-07-12 07:06:00

5. Article from Java Complete Reference
View Tutorial          By: venkatesh at 2013-06-04 01:29:02

6. Yes, finaly toString start making sense to me, tha
View Tutorial          By: Ted at 2010-04-10 19:15:50

7. sir i want to knw abt all simple java programs pls
View Tutorial          By: sakthi at 2011-08-29 14:06:10

8. this code is running successfully
View Tutorial          By: Amit Agarwal at 2013-03-08 10:56:39

9. Please, if it is incomplete, can you please send m
View Tutorial          By: Marcio at 2009-03-01 09:06:45

10. Thank you, saved my life
View Tutorial          By: Zs at 2013-04-13 22:51:54