Java : Arithmetics


The semicolon fixed it, thanks!


What is happening is that the result of 20*30 is being saved int the variable myNumber for later use, now the variable has the result stored, you're not suppose to see nothing into the screen. Also, don't forget to add the semicolon at the end of the line.

If you would like to see if whatever is stored into the variable is what you want, use System.out.print(variable);


The Semicolon fixed it, thanks!


This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.