WAP to typecast the following: Integer to Double
1 year ago
OOP Java
Compile code:
class IntToDouble {
public static void main(String[] args) {
// create int type variable
int num = 10;
System.out.println("The integer value: " + num);
// convert into double type
double data = num;
System.out.println("The double value: " + data);
}
}
Output:
Dipti KC
Jan 8, 2023