While the functionality wont change, it will improve the internal qualitythe quality of the source code. You can significantly improve a programs quality by removing dead code. This, i++ will never get a chance to run and thus, it is a dead code. Each ILOC and X86 instruction has its own Java class, and each ILOC instruction has. Also, why is this code a dead code When your loop runs for i 3, it will be terminated by break statement. Whatever we can do for a while we can do it with a Java for loop too (and of course with a do-while too). BasicBlocks are blocks of code (no conditionals, no loops, no jumps. The opposite of dead code is live, operational code. Java For Loop, is probably the most used one out of the three loops. Also note that according to its documentation, preparedStatement cant ever return null. If not, it will return -1, but I am getting 1 error and 1 dead code warning. Dead code means unnecessary, inoperative code that canand shouldbe removed. p can not be null at that point, simply because you already called setInt and setString on p and if it were null there, then it would have thrown a NullPointerException, thus never reaching your if. The first is a void that creates a 3x4 2d array and the second is to search for a value in the array, if found it will return the number of the row that contains that value. Dead code is code that can never be executed. Hello guys, I am trying write code for a question in an assignment I have. Loop distribution is the opposite of loop fusion, that is, decomposing a single loop into multiple loops.
0 Comments
Leave a Reply. |