摘要: package operator; public class Demo01 { public static void main(String[] args) { //二元运算符 int a = 10; int b = 20; int c = 30; int d = 40; System.out.pr 阅读全文
posted @ 2020-11-29 07:52 Py-JS 阅读(62) 评论(0) 推荐(0) 编辑
摘要: 在方法里面的叫局部变量;在方法外边的叫实例变量。 static声明的变量叫类变量。 public class Demo08 { //类变量 static static double salary = 2500; //属性:变量 //实例变量:从属于对象:如果不自行初始化,这个类型的默认值 0 0.0 阅读全文
posted @ 2020-11-29 06:47 Py-JS 阅读(55) 评论(0) 推荐(0) 编辑
摘要: 小数的优先级高于整数 public class Dome04 { public static void main(String[] args) { int i = 128; byte b = (byte)i; //byte最大支持127,内存溢出 double d = i; //自动转换 //强制转 阅读全文
posted @ 2020-11-29 06:32 Py-JS 阅读(85) 评论(0) 推荐(0) 编辑
摘要: 32位cpu:最大支持4G内存 64位cpu:最大支持128G内存 寻址能力 public class Dome02{ public static void main(String[] args) { //整数 int num01 = 10; byte num02 = 20; short num03 阅读全文
posted @ 2020-11-29 06:26 Py-JS 阅读(48) 评论(0) 推荐(0) 编辑
摘要: 编译型:整本书翻译 解释型:一句句翻译 源程序经过编译器javac 生成字节码class文件 class文件转给jvm虚拟机运行环境 通过解释器运行在操作系统上 阅读全文
posted @ 2020-11-29 06:24 Py-JS 阅读(78) 评论(0) 推荐(0) 编辑