How does the above code work?? Won't the compilation fail because we are trying to do addition on the finl variable i from the alex method...Please help me.
SCJP 1.4, SCWCD 1.4 - Hints for you, Certified Scrum Master
Did a rm -R / to find out that I lost my entire Linux installation!
hi Jyothi, i think that you are thinking that you are adding in constant a value. But don't worry here because in java jvm will take a by default variable in buffer and add i+j and store in that so there will be no problem. Thanks prashant Kumar Singh
I got it. At the same time doing i++ or i-- or --i, ++i wont compile. How about +i, -i???I think this will work as we are not changing the value of i when we say +i or -i.
Thanks guys.
SCJP 1.4, SCWCD 1.4 - Hints for you, Certified Scrum Master
Did a rm -R / to find out that I lost my entire Linux installation!
Hi, you are declaring i as constant , then how is it possible to apply operations on it. if you do like i++/++i/--i/i-- like operations on i then it means you are doing i=i+1/i-1; so value of constant you can not change , thats why you are facing problem. I think you will known about it.