mercredi 21 décembre 2016

Will my program execute "else" even if it executed my "if"?

I'm still really new to the programming world and right now I'm learning Java. I'm wondering, if I have the following code:

v=5;
if (v==5){
   v++;
}
else{
   //do something else
}

Will my program "execute" the else part since my variable v is now different from 5?

Aucun commentaire:

Enregistrer un commentaire