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. nice article, many thanx :)
View Tutorial          By: Unknown at 2008-10-16 21:09:02

2. why can't we download & install keybasic on ph
View Tutorial          By: jimoh abiodun at 2013-04-14 13:06:18

3. Could any one please send the working source code
View Tutorial          By: Raviteja at 2014-06-24 05:27:43

4. What is the difference between:
CMUsphinx4-

View Tutorial          By: Netrika at 2011-11-26 19:55:07

5. Post your errors, so that others may help you my f
View Tutorial          By: yogesh at 2010-01-12 00:45:42

6. i found this very pleasing for both my brain and m
View Tutorial          By: Matthew Redisons at 2012-10-03 14:36:32

7. There is possible to include 2 conditions in for l
View Tutorial          By: aarthi at 2012-12-10 12:08:50

8. Its Really Easy to understand............. superb
View Tutorial          By: Regina at 2010-01-06 23:38:11

9. Why this exception at run time?

Fri

View Tutorial          By: Sebin Joseph at 2011-04-01 06:03:17

10. I have my application running on server that is th
View Tutorial          By: vitamin b12 at 2009-12-04 10:51:56