I have a n00b/basic issue about the try catch on java.
Ini myIni;
try {
myIni = new Ini(new FileReader(myFile));
} catch (IOException e) {
e.printStackTrace();
}
myIni.get("toto");
and the error message that follows :
variable myIni might not have been initialized
Is the scope of the try only restricted to the try area ?
How can I fetch the result of myIni in the following code ?
To avoid the message, you need to set a default value before the try statement.
Or you need to put the call to the
get()method in the try statement.