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



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 its working good example.... very useful...
View Tutorial          By: Mamatha at 2012-02-02 09:23:40

2. Hi Johnny,

did you check whether th

View Tutorial          By: Frank at 2010-11-13 13:16:57

3. how to read csv file using Java
View Tutorial          By: Shireesha at 2013-12-26 07:34:22

4. sr. habla espanol necesito su ayuda... alguno tien
View Tutorial          By: ROGER HERNANDEZ at 2011-09-13 15:20:01

5. You are using stl; why do it by hand? All you nee
View Tutorial          By: gavin at 2013-02-21 12:31:29

6. Hi,

I am using this code and gettin

View Tutorial          By: Akanksha at 2014-01-20 10:31:31

7. Once i run it gives the following error.Why "
View Tutorial          By: IDK at 2008-12-18 19:56:12

8. Thank you very much for your help!!
View Tutorial          By: Ajay Singh at 2009-10-21 22:17:21

9. if a class is declared as abstract and it contains
View Tutorial          By: nagaraj at 2012-04-25 17:12:30

10. You should consider using different threads that a
View Tutorial          By: Jeremy at 2010-01-13 23:02:11