I have a string that I have generated, and I need to add it to a String[] that I created before I generated the string. I tried this:
String[] operators = {};
string generatedString = /*generating string from JTextField values*/;
operators.append(generatedString);
And this:
String[] operators = {};
string generatedString = /*generating string from JTextField values*/;
append(operators, generatedString);
And this:
String[] operators = {};
string generatedString = /*generating string from JTextField values*/;
operators.add(generatedString);
But all of them show syntax errors. I feel like there should be a simple solution that I'm missing, but I can't find it.