‘not a statement’ in Java
Java restricts the types of expressions that are allowed in so-called “expression statements”. Only meaningful expressions that have potential side effects are allowed. It disallows semantically meaningless statements like 0; or a + b;. They’re simply excluded from the language grammar. A function call like foo() can, and usually does, have side effects, so it … Read more