This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
Are there different rules for casting for different types of operators(like assignment and compound operators) I mean when byte b=1; long l=1000; b=(byte)l; //compiler asks for casting here.
And when byte b=1; long l=1000; b+=l; //which is b=b+l,and the result of b+l here is long,then why doesn't compiler ask for casting when assigning to long to byte as above exmaple.And will byte store 1000.