摘要: 方法 静态方法和非静态方法 在不同类之间调用时: 静态方法(static):和类一起加载的 可以直接通过类名调用 public class student { public void static talk(){ System.out.println("话话话"); } } public class 阅读全文
posted @ 2021-03-07 02:34 紫英626 阅读(71) 评论(0) 推荐(0) 编辑
摘要: For循环 for循环快捷键:100.for System.out.println();//会换行(纵向输出) System.out.print();//不会换行(横向输出) int[] num={1,2,3,4,5}; //增强for循环——数组循环写法 jdk5新引入的 for (int x:n 阅读全文
posted @ 2021-03-07 02:23 紫英626 阅读(62) 评论(0) 推荐(0) 编辑

紫英