Language Random: Java if-condition
I've been studying Java lately and I just learned something weird about it (coming from a C background).
I learned that if-conditions ONLY accept boolean expressions! You might be thinking, "Well duh!". But here's the catch, since it only accepts boolean expressions, an if-condition like this would generate a compile-time error in java (I'm using JDK7):
if (1) {
// some code here
}
This is not valid in Java! :O I'm definitely mind blown *A*.
Just something random I learned xD













