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. Okay, I have implemented this and it works, except
View Tutorial          By: Matthew at 2009-06-16 13:08:48

2. thank for your article it helps us to our studies
View Tutorial          By: shane at 2010-07-21 19:12:22

3. Simplified explanation with perfect Examples
View Tutorial          By: Sushant Chaudhary at 2010-07-12 00:32:18

4. Hi there is two ways you can get information.

View Tutorial          By: Sathyam at 2008-12-15 02:01:22

5. sir,i m doing ME/CSE.i want to know more informati
View Tutorial          By: m.rajalakshmi at 2011-07-27 05:20:44

6. The tutorial is simple and clear.
@Gnani, i

View Tutorial          By: Tayo at 2010-01-03 13:10:24

7. Thank you, that was short and enough :)
View Tutorial          By: Bilal korir at 2014-05-20 21:37:12

8. public class zcxzcStack
{
//push fun

View Tutorial          By: eissen at 2014-09-22 13:32:20

9. This article is not correct. Two-way synchronizat
View Tutorial          By: Travis at 2015-07-14 12:28:32

10. Hi Fred, I found this link which has more explanat
View Tutorial          By: Boulvat at 2012-09-25 08:36:48