The reason for that is simple – in java every condition must be resolved as a boolean value (true of false) while in c / c++ false is 0 while true is anything else…
More Related Contents:
- Same thing like C++ pointer in Java
- Repeat the “if” statement if it has to go to the “else” statement
- java vs C++ in pre and post increment
- Why am I getting “Error: ‘else’ without ‘if'”? [duplicate]
- New to Java and having issues writing and example
- Why is it considered a bad practice to omit curly braces? [closed]
- What is the relative performance difference of if/else versus switch statement in Java?
- Is there a way to simulate the C++ ‘friend’ concept in Java?
- How can I check if an app running on Android?
- C++ equivalent of java’s instanceof
- How to call Java functions from C++?
- Selenium WebDriver: Wait for complex page with JavaScript to load
- What is better: multiple “if” statements or one “if” with multiple conditions?
- java Lang UnsupportedClassVersion Error in Xamarin Studio
- How to check if a string starts with one of several prefixes?
- How to use this boolean in an if statement?
- Tool to convert java to c# code [closed]
- Why hypot() function is so slow?
- How to compile dynamic library for a JNI application on linux?
- What’s the C++ idiom equivalent to the Java static block?
- Why we use if, else if instead of multiple if block if the body is a return statement
- Port of Random generator from C to Java?
- Why Java does not see that Integers are equal?
- Generating Java interface with SWIG
- Pass an array to a wrapped function as pointer+size or range
- What is inlining?
- Attach to already running JVM
- Interview question – Search in sorted array X for index i such that X[i] = i
- is it possible to check if a char matches a list of possibilities?
- C++ ifstream.getline() significantly slower than Java’s BufferedReader.readLine()?