BASIC CONSTRUCTS

18. How to convert double to int

            class DoubleToInt{
                public static void main(String st[]){
                    double num = 29;
                    int n = (int)num;
                    System.out.println("Converted int : "+n);
                }
        }
        

OUTPUT

Converted int : 29