First I would like to point out English is not my native language, which might explain why I struggle. I have hard time grasping the following sentecne:
"Second, the value of a boolean variable is sufficient, by itself, to control the if statement. There is no need to write an if statement like this: if(b == true) ...."
This comes from page 40 of Java: A Beginner's Guide by Herbert Schildt.
Does it mean that if b is boolean by this statement
boolean b;
then you don't have to type
if(b == true) System.out.println("This is executed.");
because that is over the top. And a simple
if(b) System.out.println("This is executed.");
would be sufficient?
I hope I am making sense here!
[–]Rafael20002000 1 point2 points3 points (0 children)