Hi All,
I've Included two source files that I would think would do the same thing, but they dont
Using Compound Assignment Operators I have no compilation errors.
But when I convert the code to strict Assignment Operators I get "Possible Loss of Precision"
1. How do I change the 2nd source code so it doesn't give me these errors
2. Why is there a difference. Why doesn't the Compound Assignment Operators give me the same errors.
No Compilation Errors:
Compliation Errors:
Compilation Error:
src\com\scjaexam\tutorial\pirates\AssignmentOperators.java:11: possible loss of
precision
found : int
required: byte
_________System.out.println(a = a + 3); // 13
_____________________________^
Thanks!