摘要: 所有变量、方法、类名:见名知意类成员变量:首字母小写和驼峰原则:monthSalary除了第一个单词以外,后面的单词首字母大写lastname lastName 局部变量:首字母小写和驼峰原则常量:大写字母和下划线:MAX VALUE类名:首字母大写和驼峰原则:Man.GoodMan 方法名:首字母 阅读全文
posted @ 2022-06-03 17:39 毒蛇青椒 阅读(17) 评论(0) 推荐(0) 编辑
摘要: public class Demo04 { public static void main(String[] args){ int i=128; double b=(byte)i; //强制转换 (类型)变量名 高--低 //自动转换 低--高 System.out.println(i); Syst 阅读全文
posted @ 2022-06-03 15:47 毒蛇青椒 阅读(3) 评论(0) 推荐(0) 编辑
摘要: public class Demo01 { public static void main(String[] args){ String Ahello="renweiqing"; String hello="renweiqing"; String $hello="renweiqing"; Strin 阅读全文
posted @ 2022-05-28 22:17 毒蛇青椒 阅读(7) 评论(0) 推荐(0) 编辑
摘要: public class HelloWorld { public static void main(String[] args){ //单行注释 //输出一个Hello,World! System.out.println("Hello,world"); //多行注释:可以注释一段文字 / /* 注释 阅读全文
posted @ 2022-05-28 19:03 毒蛇青椒 阅读(13) 评论(0) 推荐(0) 编辑