WAP to typecast the following: Double to Integer
2 years ago
OOP Java
Compile code:
class DoubleToInt{
public static void main(String[] args) {
// create double type variable
double num = 10.99;
System.out.println("The double value: " + num);
// convert into int type
int data = (int)num;
System.out.println("The integer value: " + data);
}
}
Output:

Dipti KC
Jan 8, 2023