I have a query about strings.
I’m declaring my string array as:
private static String[] name;
I’m then trying to add a string to it:
name[0] = temp // Where temp as another string
I am getting a nullpointer error with the above code. Am I initialising my string array correctly?
Looks like you’ve missed to write
name = new String[CAPACITY];somewhere