摘要: import com.sun.xml.internal.ws.api.model.wsdl.WSDLOutput;public class Demo06 { //静态的常量 static final double Pi = 3.14;//始终不会变的常量 static double salary = 阅读全文
posted @ 2022-02-04 20:16 阮北海 阅读(126) 评论(0) 推荐(0)
摘要: public class Demo05 { public static void main(String[] args) { //操作较大的数时,注意溢出问题 //数字之间用下划线隔开更易于查看 int money = 10_0000_0000; int years = 20; int total 阅读全文
posted @ 2022-02-04 17:40 阮北海 阅读(42) 评论(0) 推荐(0)
摘要: public class Demo04 { //javas是强类型语言 需要进行运算的时候 需要用到类型转换 /*低到高 * byte,short,char->int->long->double * 运算中 不同类型数据先转换成同一类型 然后再进行计算 * * * * */ public stati 阅读全文
posted @ 2022-02-04 17:39 阮北海 阅读(23) 评论(0) 推荐(0)