+ 1

What is the output of ::: int a = 10; System.out.println(((a++)++)++)));

do explain the reason too.

25th May 2017, 1:46 PM
Abhishek Mehandiratta
Abhishek Mehandiratta - avatar
3 Answers
+ 4
error with these variable value mean a++ return 10 so (((10)++)++) (with 10 is value not variable)
25th May 2017, 2:29 PM
Yanothai Chaitawat
Yanothai Chaitawat - avatar
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.
7th Sep 2019, 4:31 AM
gabriel
0
What is the output? int a = 10; System.out.println(a--*a--);
7th Nov 2023, 9:42 PM
Aditya Sarkar
Aditya Sarkar - avatar