okkero
01/25/2017, 4:06 PMgoto
in Java?dalexander
01/25/2017, 4:06 PMs.luhmirins
01/25/2017, 4:07 PMgoto
in Java. It could also be Pascal way back in school 🙂okkero
01/25/2017, 4:08 PMgoto
is a reserved word in Java, sure. But using it is an error.okkero
01/25/2017, 4:09 PMgoto
in the futuremiha-x64
01/25/2017, 4:09 PMconst
🙂s.luhmirins
01/25/2017, 4:09 PMokkero
01/25/2017, 4:11 PMgoto
as a construct is in general seen as bad...but most constructs we have today are just limited and more specific forms of goto
anywayrobin
01/25/2017, 4:33 PMmiha-x64
01/25/2017, 4:52 PMsreich
01/25/2017, 5:14 PMsreich
01/25/2017, 5:15 PMsreich
01/25/2017, 5:15 PMsreich
01/25/2017, 5:15 PMsreich
01/25/2017, 5:15 PMcedric
01/25/2017, 5:25 PMfinal
except on fields anyway.semoro
01/25/2017, 5:56 PMenighma
01/25/2017, 6:07 PMkevinmost
01/25/2017, 6:32 PMfinal
elsewhere? I've used it in local scopes and it was useful, in my opinioncedric
01/25/2017, 6:36 PMcedric
01/25/2017, 6:36 PMkevinmost
01/25/2017, 6:37 PMfinal String myVar;
if (someCondition) {
myVar = val1;
} else if (someOtherCondition) {
myVar = val2;
} else {
throw new IllegalStateException("...");
}
// use myVar and know it was properly initialized
enighma
01/25/2017, 6:38 PMenighma
01/25/2017, 6:38 PMkevinmost
01/25/2017, 6:38 PMcedric
01/25/2017, 6:39 PMfinal
is useful there. Fortunately, it’s pretty rare to initialize locals this wayevanchooly
01/25/2017, 7:03 PMenighma
01/25/2017, 7:09 PMkevinmost
01/25/2017, 7:11 PMmyVar
and it's possible that it wasn't initializedkevinmost
01/25/2017, 7:11 PM