What are the arguments both for and against the exclusive use of boolean expressions in the control statements in java (as opposed to also allowing arithmetic expressions, as in c++)?

Respuesta :

Reliability is the major argument for the exclusive use of Boolean expressions (expressions that result to either true or false) inside control statements (i.e. if…else, for loop). Results from control statements become reliable because Java has disallowed other types to be used. Other types, like arithmetic expressions in C++ oftentimes include typing errors that are not detected by the compiler as errors, therefore causing confusion.

Q&A Education