Why does:
public class Addition {
public static void main() {
int a = 0;
double b = 1.0;
a = a + b;
System.out.println(a);
} }
not compile but:
public class Addition {
public static void main() {
int a = 0;
double b = 1.0;
a += b;
System.out.println(a);
} }
compiles.