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. the article is very useful...!
View Tutorial          By: pravin salame at 2011-05-20 11:58:28

2. easy to understand for newbie... :P
View Tutorial          By: Emraan at 2011-11-02 16:09:56

3. I am new to J2ME but this was really help full and
View Tutorial          By: Subhash at 2013-05-05 08:57:38

4. Good stuff.
View Tutorial          By: flazwbooks at 2010-07-18 05:50:50

5. Very good explanation along with the example. Can
View Tutorial          By: Divya at 2010-09-21 03:05:10

6. can you tell me how can i install javax.comm.* lib
View Tutorial          By: chinthaka at 2011-06-22 09:30:29

7. very simple explanation
View Tutorial          By: shahbaz at 2010-03-19 10:34:32

8. how do i use the jsapi classes and the freets pack
View Tutorial          By: Chileshe at 2012-08-22 14:23:38

9. Sir,
i am implementing the above code in w

View Tutorial          By: Rahul Singh at 2009-09-01 04:23:25

10. Really The Best Start for mE
View Tutorial          By: neeraj at 2012-01-26 13:27:31