-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathConver.java
More file actions
27 lines (24 loc) · 628 Bytes
/
Conver.java
File metadata and controls
27 lines (24 loc) · 628 Bytes
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
package java01;
public class Conver {
/**
* @param args
*/
public static void main(String[] args) {
// TODO 自动生成的方法存根
byte mybyte = 127;
int myint = 150;
float myfloat = 452.12f;
char mychar = 10;
double mydouble = 34.34232323;
// 输出运算结果
System.out.println("127+452.12:"+(mybyte + myfloat));
System.out.println("127*150:"+(mybyte * myint));
System.out.println("127+452.12:"+(mybyte + myfloat));
System.out.println("127+452.12:"+(mybyte + myfloat));
int num1 = 34;
double num2 = num1/3;
System.out.println(num2);
double num3 = (double)num1/3;
System.out.println(num3);
}
}