Java Syntax Question 6

True of False

Comments cause the computer to print the text after the // on the screen when the program executes.



False. 
Comments can perform no action when the program executes. 
They document programs and improve their readability.

All variables must be given a type when they're declared.



True.

Java considers the variables number and NuMbEr to be identical.



False. 
Java is case sensitive, so these variables are different.

The remainder operator (%) can be used only with integer operands.



False. 
The remainder operator can be used with non-integer operands in Java.

P:The arithmetic operators *, /, %, + and - all have the same level of precedence.



False. 
The operators *, / and % are higher precedence than operators + and -.



PreviousNext

Related