Skip to content

Commit 554c217

Browse files
added ExplicitTypeCasting program
1 parent 412f7eb commit 554c217

1 file changed

Lines changed: 12 additions & 0 deletions

File tree

ExplicitTypeCasting.java

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
class ExplicitTypeCasting
2+
{
3+
public static void main(String [] args)
4+
{
5+
double d = 100.45;
6+
long i = (long)d;
7+
int x = (int)d;
8+
System.out.println("The double value is "+d);
9+
System.out.println("The long value is "+i);
10+
System.out.println("The int value is "+x);
11+
}
12+
}

0 commit comments

Comments
 (0)