Skip to content

Commit dc7e996

Browse files
committed
Added TypeCasting programs
1 parent 8229a63 commit dc7e996

19 files changed

Lines changed: 132 additions & 16 deletions
971 Bytes
Binary file not shown.

bin/Concept/BasicAccessTest.class

623 Bytes
Binary file not shown.

bin/Concept/ConvertToString.class

1.56 KB
Binary file not shown.
1.06 KB
Binary file not shown.
979 Bytes
Binary file not shown.
26 Bytes
Binary file not shown.
0 Bytes
Binary file not shown.
0 Bytes
Binary file not shown.
-34 Bytes
Binary file not shown.
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
package Concept;
2+
3+
public class AutomaticTypeConvert
4+
{
5+
public static void main(String[] args)
6+
{
7+
int i = 100;
8+
9+
//automatic type conversion or Widening
10+
// Byte->Short->Int->Long->Float->Double
11+
long l = i;
12+
13+
//automatic type conversion
14+
float f = l;
15+
System.out.println("Int value "+i);
16+
System.out.println("Long value "+l);
17+
System.out.println("Float value "+f);
18+
}
19+
}

0 commit comments

Comments
 (0)