Memory allocation for array of objects

Will memory be allocated when i do assignments of array of objects.

For instance,

class A {

boolean [] bits;

A (int num)

{

bits = new boolean[num];

}

}

class main{

A [] obj;

main ()

{

obj = new A [4];

for (int i=0; i<4; i++)

{

obj = new A (10);

}

}

breed ()

{

A temp = obj[0];

//** Is memory where obj[0] is pointing to being duplicated?

//** Or is temp juz pointing to the same memory block where obj

//[0]= is pointing to?

}

}

Thank!

[615 byte] By [Schmike07a] at [2007-9-28 0:49:31]
# 1
The second :> temp juz pointing to the same memory> emory block where obj[0] is pointing to?
phohmeyera at 2007-7-7 20:24:23 > top of Java-index,Other Topics,Algorithms...