Why will javac not accept x = x y

Total Post:110


 1786  View(s)
Rate this:
Hi Mindstickians!

From the perspective of Compiler Theory, why would the javac compiler not accept a statement of the form x = x+++++y but accept x = x+++ ++y ?

Thanks in advance! 
  1. Re: Why will javac not accept x = x y

    Hi Jeet!

    Java has the syntax x++ and ++y so the second one is interpreted as x++ + ++y so it is accepted. the first cannot be accepted using that rule.


Please check, If you want to make this post sponsored

You are not a Sponsored Member. Click Here to Subscribe the Membership.