This is a question about java local variables (Following code in the same method)
boolean userWantsToSave;
userWantsToSave = true;
Eclipse throws The value of the local variable userWantsToSave is not used, my question is why?
Since the variable is assigned true, why is it still not used?
System.out.println(userWantsToSave);for example and the warning will disappear, i.e. use the variable, in this case just printing its value to the console.