📄 numberdemo.java~24~
字号:
package number;
public class NumberDemo {
public static void main(String[] args) {
double d1 = 55.23;
//应用数字创建数字类
Double double1 = new Double(d1);
//应用字符串创建数字类
Double double2 = new Double("55.23");
//显示最大值
System.out.println("Double.MAX_VALUE=" + double1.MAX_VALUE);
//显示最小值
System.out.println("Double.MIN_VALUE=" + double1.MIN_VALUE);
byte byteType = double1.byteValue();
int intType = double1.intValue();
long longType = double1.longValue();
float floatType = double1.floatValue();
double doubleType = double1.doubleValue();
System.out.println("double1.byteValue() = " + byteType);
System.out.println("double1.intValue() = " + intType);
System.out.println("double1.longValue() = " + longType);
System.out.println("double1.floatValue() = " + floatType);
System.out.println("double1.doubleValue() = " + doubleType);
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -