LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (http://www.linuxquestions.org/questions/linux-general-1/)
-   -   Java classe getting sucked in (http://www.linuxquestions.org/questions/linux-general-1/java-classe-getting-sucked-in-773267/)

Thor_2.0 12-03-2009 01:51 PM

Java classe getting sucked in
 
Hi,

Okay, this is the trick of the dissappearing class... :D

I have a class that holds some values, and an arraylist. The siez thereof is - sya - 2 (the arraylist, that is)

I call and instantiate a class and give it the holder class as parameter. Before doing that, the holder class reports the correct size, the second time, the size is 0.

If I call a method and feed such a class as parameter

Quote:

aClass = new SomeClass();
System.out.println("het holderclass has : " + aHolder.thelist().size + " elements.");
// aHolder.thelist() returns an ArrayList() of Serialized stuff
aClass.takeTheList(aHolder);
when I call this, the second run reposts no elements in the arraylist.

Where do I goof off...

Do you need to call like "byref" or something?

Tnx!!

Thor


All times are GMT -5. The time now is 08:35 PM.