int I =(int)23.23;
Of course there will be a loss of accuracy.
Java's Double encapsulation class also provides a method to get the int value of Double. In fact, the essence of this method is the strong transformation above.
For example:
Double d = new double (23.23);
int double toint = d . int value();