I have this array:
String[] countriesList = {
"Japan",
"Sverige",
"Tyskland",
"Spanien",
"Syrien",
"Litauen",
};
I want to be able to add another thing to the array, in this case this [6]th position. Is it possible to do this by JOPtionPane? This is what I've done this far, however nothing happens nor does any errors occur.
String addland = JOptionPane.showInputDialog("Vilket land vill du lägga till?").trim();
countriesList[6] = addland;