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



Ask a Question

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. How can i add all the values of an multidimensiona
View Tutorial          By: jolly at 2015-04-11 11:54:47

2. This program is mush faster and finer than given p
View Tutorial          By: Anonymous at 2013-02-27 05:38:27

3. Nice example to understand what does the string To
View Tutorial          By: Spha at 2011-07-14 08:00:03

4. Could you somehow use the substring method to pars
View Tutorial          By: Eric at 2009-04-26 19:20:26

5. /* File name : Employee.java */
public abst

View Tutorial          By: Anonymous at 2012-11-16 12:23:17

6. i m new in java plz send some programs on packages
View Tutorial          By: zainul hasan mirza at 2009-08-31 02:28:32

7. very use full.....
View Tutorial          By: janarthanam at 2015-08-29 06:53:03

8. I have error on "serversocket", vb.net h
View Tutorial          By: stephen at 2012-07-14 19:40:03

9. I writing a main class in the eclipse IDE and call
View Tutorial          By: adam lim at 2013-03-11 04:13:51

10. neded defination in clear
View Tutorial          By: venkat at 2011-07-04 06:31:19