Hey Guys,
I've got a function filling a HashMap
(rMap
) of String arrays. Once certain conditions are met e.g r.Map.size() != 0
I then, in another file (rMap
is a Global variable) call the following String array[] = rMap.get(0)
from this I attempt to System.out.println(array[0])
.
Thats the run of the program and I get a null pointer at System.out.println(array[0]);
. Anyone have any ideas why this happens?
EDIT: I'm filling the map like so..
String center[] = new String[] { tname, tmessage, tlink, tsname };
Global.rMap.put(index, center);
Where all values in the array are variables that are strings. So the value I'm accessing it tname
and It's not equal to null. I've checked. My Key value is a String