Which of the following pieces of code are considered to be a correct Java code?

Say please, why Math.abs(1) + Math.abs(2); is not a correct STATEMENT? I have entered code sample: int i = Math.abs(1) + Math.abs(2); in method main and program runs without problems.

2016 Feb 1, 10:42:28 AM

... "Math.abs(1);" is a correct *STATEMENT*, and "Math.abs(1) + Math.abs(2);" is not a correct *STATEMENT*.

2015 Jul 31, 5:12:51 PM

Login in to like

Login in to comment