Document
摘要: java的数据类型分为两大类 基本类型(primitive type) 数据类型 整数类型 byte占一个字节范围:-128-127 short占两个字节范围:-32768-32767 int占四个字节范围:-2147483648-2147483647 long占用八个字节范围:-922337203 阅读全文
posted @ 2022-07-25 15:26 一蓑烟雨任平生。。 阅读(63) 评论(0) 推荐(0)
摘要: 变量 import java.sql.SQLOutput;​public class Demo04 {​ //属性:变量​ //static 类变量 static double adad = 121234;​ //实例变量:属于对象 int age; String name;​​ //main 方法 阅读全文
posted @ 2022-07-25 15:24 一蓑烟雨任平生。。 阅读(21) 评论(0) 推荐(0)
摘要: 类型转换 public class Demo03 { public static void main(String[] args) {​ int i = 128; byte b = (byte) i;//内存溢出问题​ //强制转换 (类型)变量名 高 低 //自动转换 低 高​ int a = 1 阅读全文
posted @ 2022-07-25 15:24 一蓑烟雨任平生。。 阅读(54) 评论(0) 推荐(0)
Document