So for instance
Code: Select all
if(Jager.hasSpoon()) //that's equal to if(Jager.hasSpoon() == true)
{
Jager.eatNoodles();
}
However, when adding a "!"..
Code: Select all
if(!Jager.hasSpoon()) //that's equal to if(Jager.hasSpoon() == false)
{
Jager.eatNoodles();
}
Thus, the meaning of the block remains the same but its condition to get executed inverts.
According to my reply count..
If I login and I had to read through several pages of posts before being able to give an adequate reply, I tend not to reply. (TLDR)
If there's a question, where I assume that other more active forum users can give a qualified answer too, I tend not to reply.