摘要: this this(id,name);//调用另一个方法只能放在第一行 this id = id; this name = name; public Student(int id, String name, char gender) { this.id = id; this.name = name; 阅读全文
posted @ 2023-03-10 22:33 VIoleng 阅读(19) 评论(0) 推荐(0)
摘要: lombok 注解开发: @解释名称 只需要在类上,方法,属性,形参 加上一个注解 就配置完成了 效率很快 this this(id,name);//调用另一个方法只能放在第一行this id = id;this name = name;​​public Student(int id, String 阅读全文
posted @ 2023-03-04 15:06 VIoleng 阅读(23) 评论(0) 推荐(0)
摘要: default switch(num): case 1:语句;break; case 2:语句;break; case 3:语句;break; default:语句;break; Random 随机数 Random r = new Random();r.nextInt(9000)+1000;//4位 阅读全文
posted @ 2023-02-25 21:07 VIoleng 阅读(20) 评论(0) 推荐(0)