Roel De Nijs wrote: Let me test your knowledge a little bit
Assuming total and count are both class variables of type int as inwhich of the following will compile
Thanks for your question, Roel. It is good that I am obliged to remember previous topic which I have already read

At first, I think all lines will compile except line1. Line1 doesn't compile so i have already learned from OCA book (on page 55, Numeric Promotion section) I am a bit confused line5 & line6 and think that these compile for autoboxing. Then I test these codes in Netbeans and saw that line6 doesn't compile, it must be cast to long
We can't declare Long variable as this
We must add "L" after value or cast to long