4 ms·
I should have used a better example, but there are a good number of cases where the Java compiler complains about missing return statements that just don't need
by mdasen 18y ago
I should have used a better example, but there are a good number of cases where the Java compiler complains about missing return statements that just don't need to be there. It's a wart in the language.
- dcminter 18y agoCan you cite a specific example where the condition is NOT ambiguous and the Java compiler WILL produce an error? The example you cite is incorrect (see my post later) - you can compile code of this form just fine. I'm not aware of unambiguous situations where the compiler will complain; if you see an error it's usually pebkac!