+ 1
What is the output of ::: int a = 10; System.out.println(((a++)++)++)));
do explain the reason too.
3 Answers
+ 4
error
with these
variable
value
mean
a++ return 10
so
(((10)++)++)
(with 10 is value not variable)
0
Error, because after the first evaluation, that is the inner (a++) evaluates to 10 , you will have the second evaluation, 10++.
The operator ++ expects always a variable, and that ist why the error.
0
What is the output?
int a = 10;
System.out.println(a--*a--);