-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathType_casting.java
40 lines (35 loc) · 1.08 KB
/
Type_casting.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
package First_Idea.src;
import java.util.Scanner;
public class Type_casting {
public static void main(String[] args) {
Scanner input = new Scanner(System.in);
// float num = input.nextFloat();
// System.out.println(num);//Type Should be Compatible for type conversion
// //Destination Type Should be greater than the Source Type
// int num1= (int)(67.56f);
// int a = 255;
// byte b = 40;
// byte c = 50;
// byte d = 100;
// int e = b * c / d;
// System.out.println(e);
// byte b = 50;
// b = (byte)(b*2);
// System.out.println(b);
// System.out.println("नमस्कार");
// byte b = 56;
// char c = 'A';
// int i = 70000;
// double s = 67843.342424;
// float f = 6734896.4321f;
// double result = f*b + s/i + (b-c);
// System.out.println(result);
// System.out.println(f*b +" "+ s/i +" "+ (b-c));
int count = 1;
while (count != 5)
{
System.out.println(count);
count++;
}
}
}