Why does the assignment of the form int = int * double give an error, and the assignment of the form int * = double does not give an error (in Java)?
Example:
public class TestEmp { public static void main(String[] args) { double e = 10; int r = 1; r *= e; r = r * e; System.out.println("De uitkomst van r :" + r); } }
r *= e
accepted, but r = r * e
is not. Why?
source share