Hi,
The test code below leads to a "null pointer deference" bug on a String Array(on line 6). This leads to a NullPointerException.
public class TestString {
public static void main (String args[]) {
String test [] = null;
for (int i =0; i < 5; i++) {
String testName = "sony" + i;
test [k] = testName;
}
}
}
-- How do I fix this? -- What is it that causes this bug?
Thanks, Sony