res starts with the value 25, what will be the outputof System.out.println(res–); System.out.println(++res);

Q23. Assuming that res starts with the value 25, what will the following code fragment print out?

System.out.println(res–);

System.out.println(++res);

Ans.

output:

24

26

 

 

Leave a Reply

Your email address will not be published. Required fields are marked *

%d bloggers like this: