java - Can if statements be broken half way through? -
i wondering if 'if' statement halfway through running stop running if conditions has meet no longer met. hard explain words, here example:
boolean flag = true; if(flag){ //some code execution here (code execution #1) flag = false; //some more code execution here (code execution #2) } will "code execution #2" run in case? or the rest of if statement skipped when flag set false?
the entire contents of if statement executed since @ time of condition check, flag equaled true.
Comments
Post a Comment