1. If either is of type double, the other is converted to double.
2. Otherwise, if either is a float, the other is converted to float.
3. Otherwise, if either is of type long, the other is converted to long.
4. Otherwise, both operands are converted to int.
publicclass MainClass{
publicstaticvoid main(String[] argv){
int i=0;
double d = 0D;
int j = i+d;
System.out.println();
}
}
Exception in thread "main" java.lang.Error: Unresolved compilation problem:
Type mismatch: cannot convert from double to int
at MainClass.main(MainClass.java:5)