Comment on Tutorial - How to use ArrayList in Java By Hong



Comment Added by : ADC

Comment Added at : 2010-02-25 18:43:32

Comment on Tutorial : How to use ArrayList in Java By Hong
I entered four different objects into an ArrayList using the add function.

when I want to list the contents as per your example, the most recent entry appears to occupy all four positions in the list.

This cannot be. Do you know what the source of the problem is?


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. Thanks for this article. Now I can understand Iter
View Tutorial          By: Rajesh Kumar at 2010-12-14 03:27:25

2. we are java research students.
we are worki

View Tutorial          By: chetan at 2007-10-17 08:13:14

3. Thank you very much for your help,
this co

View Tutorial          By: AA at 2011-09-09 14:24:45

4. Helps very much. Thank you.
View Tutorial          By: Uwe at 2010-08-17 12:35:44

5. Thanks.It helps a lot to me.
View Tutorial          By: Sachin at 2013-05-24 19:36:36

6. Please, if it is incomplete, can you please send m
View Tutorial          By: Marcio at 2009-03-01 09:06:45

7. my program is run and it created file in the sd ca
View Tutorial          By: mahesh at 2013-01-21 04:15:21

8. Thanks for the useful tutorials abt strtus 1 vs St
View Tutorial          By: Sudharsan at 2011-12-03 11:54:58

9. marvelous
View Tutorial          By: Anon at 2009-02-12 07:51:44

10. I have altered the code as described (xml addition
View Tutorial          By: Spijker at 2015-10-14 12:27:47