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

Popular posts from this blog

cakephp - simple blog with croogo -

How to group boxplot outliers in gnuplot -

bash - Performing variable substitution in a string -