This code I have written to convert double
into int
getting an exception.
Exception in thread "main" java.lang.Error: Unresolved compilation problem:
Cannot cast from Double to int
This is my code
Double d = 10.9;
int i = (int)(d);
See Question&Answers more detail:os