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. could u help me i want to integrate the paypal sys
View Tutorial          By: Anand at 2011-01-17 21:59:25

2. Please help me i am getting following error messag
View Tutorial          By: Balaji at 2009-09-23 22:54:06

3. Very nice.
Thanks

View Tutorial          By: Kaviya at 2015-02-23 13:48:15

4. how to return the boolean value. what is the data
View Tutorial          By: karthick at 2013-02-07 10:21:28

5. Excellent
View Tutorial          By: Dev at 2008-08-01 02:41:25

6. why the java program must be written in side the c
View Tutorial          By: surendra at 2009-04-01 09:02:42

7. This site is an Excellent Choice for lerners.Thank
View Tutorial          By: Sravanthi at 2011-06-28 06:20:35

8. hi all,

i successfully executed the

View Tutorial          By: praveen at 2010-07-14 04:47:41

9. Unable to connect with https:\\localhost:8443 but
View Tutorial          By: gopala krishna at 2012-04-02 07:17:09

10. superb...thanks :-)
View Tutorial          By: sunny at 2010-11-10 07:20:25