//A double value too large to be represented as a float becomes positive or negative infinity.
publicclass MainClass {
publicstaticvoid main(String[] argv) {
double d = 1.1;
float f = d;
System.out.println();
}
}
Exception in thread "main" java.lang.Error: Unresolved compilation problem:
Type mismatch: cannot convert from double to float
at MainClass.main(MainClass.java:4)