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 to read thank you for the notes. that helps m
View Tutorial          By: V.Ranjith kumar at 2010-08-12 06:13:03

2. it is very nice example of overloading when i read
View Tutorial          By: narendra saini at 2012-04-20 04:03:56

3. the difference is of great important for new comme
View Tutorial          By: ramesh shetty at 2013-03-12 15:27:23

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

5. Dude how did you used out.print() method it is giv
View Tutorial          By: Hardik at 2013-02-18 15:37:09

6. two of them are equal and third one is less than b
View Tutorial          By: nani at 2011-10-28 10:55:58

7. Really a great article!
I have some questio

View Tutorial          By: ron at 2010-03-30 01:37:12

8. A very good example to kickstart my preparation on
View Tutorial          By: Javaenthu at 2013-07-28 06:35:44

9. Thanx!!!!....
It helped me to startup with

View Tutorial          By: RAJITHA REDDY at 2011-03-01 02:47:03

10. can we use if statment with swich,,,!!!
View Tutorial          By: dena at 2011-07-09 13:52:27