Delete Variable Completely
in
Programming Questions
•
1 year ago
Hello all,
Thanks,
Basically, what I want the program to do is try to read a file, and If it exists, continue. If it doesn't exist, create the file and then read it. This is the code I have so far:
- try {
- String[] input = loadStrings(System.getProperty("user.home") + "/Paint Files/" + "ccSave.txt");
- } catch (NullPointerException input) {
- saveColors();
- String[] input = loadStrings(System.getProperty("user.home") + "/Paint Files/" + "ccSave.txt");
- }
When I run this, I get this error:
Duplicate local variable input
How would I delete the entire variable and then re-create it. I'm not sure if I'm understanding this error correctly or not. They're a little vague. There's nothing in the console but this.
andrewgies17
1