State whether each of the following is true or false. If false, explain why.
- An algorithm is a procedure for solving a problem in terms of the actions to execute and the order in which these actions execute.
- A set of statements contained within a pair of parentheses is called a block.
- A selection statement specifies that an action is to be repeated while some condition remains true.
- A nested control statement appears in the body of another control statement.
- Java provides the arithmetic compound assignment operators +=, -=, *=, /= and %= for abbreviating assignment expressions.
- The primitive types (boolean, char, byte, short, int, long, float and double) are portable across only Windows platforms.
- Specifying the order in which statements (actions) execute in a program is called program control.
- The unary cast operator (double) creates a temporary integer copy of its operand.
- Instance variables of type boolean are given the value TRue by default.
- Pseudocode helps a programmer think out a program before attempting to write it in a programming language.
Write four different Java statements that each add 1 to integer variable x.
Comments
Leave a comment