Page 1 of 1

Re: About Question enthuware.ocajp.i.v7.2.849 :

Posted: Thu Jun 16, 2016 3:52 pm
by admin
Because the compiler doesn't execute any code. It doesn't know that "b".equals(s) is true. It is the JVM that executes the code.
Here is a good discussion about unreachable code: http://www.coderanch.com/t/662554/ocajp ... hable-code