Guest_imported
New member
- Jan 1, 1970
- 0
Hi In my application I need to build an Array of vectors
ex: Vector[] list = new Vector[100];
then I want to add elements in the vectors that I chose in my list
ex: list[3].addElement("hello"
But I get an NullPointer Exception at RunTime!!!
What the hell? It works fine for an array of Strings
ex: String[] strList = new String[100];
//and do
strList[3] = "hello";
And there are both Objects!
But I need a Vector (number of elements varies importantly..)
Does anyone know how to overcome this? Thanks!!
ex: Vector[] list = new Vector[100];
then I want to add elements in the vectors that I chose in my list
ex: list[3].addElement("hello"
But I get an NullPointer Exception at RunTime!!!
What the hell? It works fine for an array of Strings
ex: String[] strList = new String[100];
//and do
strList[3] = "hello";
And there are both Objects!
But I need a Vector (number of elements varies importantly..)
Does anyone know how to overcome this? Thanks!!