09.11.2014, 16:14
What's the Difference between || and &&
if (a == true && b == true) {
// This only gets excuted if BOTH a AND (&& = and) b are true
}
if (a == true || b == true) {
// This gets executed when either:
// a == true (b can be true or false) OR (|| = or)
// b == true (a can be true or false)
}