Array Declarations
I need a class to have a member which is an array .This array should have a constant size irrespective of the instances that are created on this class. Java prevents declaring size of an array.But the above scenario cannot be reached.I need to know why Java has prevented constant size declaration.Please post your opinions on this issue
[344 byte] By [
Sansofta] at [2007-11-27 6:55:56]

It's really not clear what you're talking about.
class Foo {
static int[] classArray = new int[12345];
int[] instanceArray = new int[12345];
}
No matter how many Foo's you create, each one's instance array will have 12345 elements and they will all share a single class array having 12345 elements.
Can you clarify what you're trying to do, and why?
jverda at 2007-7-12 18:32:42 >
