上一页 1 ··· 3 4 5 6 7 8 9 下一页
摘要: 方法的定义和调用 package zaiyang.method; public class Demo02 { public static void main(String[] args) { int max = max(100,10); System.out.println(max); } //比大 阅读全文
posted @ 2022-01-10 20:46 追风的羊 阅读(52) 评论(0) 推荐(0)
摘要: 什么是方法 package zaiyang.method; public class Demo01 { //main方法 public static void main(String[] args) { int sum = add(5,14); System.out.println(sum); } 阅读全文
posted @ 2022-01-09 21:01 追风的羊 阅读(50) 评论(0) 推荐(0)
摘要: 打印三角形及Debug package zaiyang.struct; public class TestDemo { public static void main(String[] args) { //打印三角形 5行 for (int i = 1; i <= 5; i++) { for (in 阅读全文
posted @ 2022-01-09 20:33 追风的羊 阅读(41) 评论(0) 推荐(0)
摘要: Break Continue循环终止用法 package zaiyang.struct; public class BreakDemo { public static void main(String[] args) { int i = 0; while (i<100){ i++; System.o 阅读全文
posted @ 2022-01-08 22:13 追风的羊 阅读(164) 评论(0) 推荐(0)
摘要: 增强for循环 package zaiyang.struct; public class ForDemo06 { public static void main(String[] args) { int [] numbers = {10,20,30,40,50};//定义了一个数组 for (int 阅读全文
posted @ 2022-01-08 21:34 追风的羊 阅读(34) 评论(0) 推荐(0)
摘要: For循环打印九九乘法表 package zaiyang.struct; /* 1×1=1 1×2=2 2×2=4 1×3=3 2×3=6 3×3=9 1×4=4 2×4=8 3×4=12 4×4=16 1×5=5 2×5=10 3×5=15 4×5=20 5×5=25 1×6=6 2×6=12 3 阅读全文
posted @ 2022-01-08 20:57 追风的羊 阅读(348) 评论(0) 推荐(0)
摘要: For循环详解 package zaiyang.struct; public class ForDemo01 { public static void main(String[] args) { int a = 1;//初始化条件 while (a <= 100) {//条件判断 System.ou 阅读全文
posted @ 2022-01-08 11:22 追风的羊 阅读(164) 评论(0) 推荐(0)
摘要: DoWhile循环 package zaiyang.struct; public class DoDemo01 { public static void main(String[] args) { int i = 0; int sum = 0; do { sum = sum + i; i++; }w 阅读全文
posted @ 2022-01-08 10:21 追风的羊 阅读(54) 评论(0) 推荐(0)
摘要: while循环详解 package zaiyang.struct; public class WhileDemo01 { public static void main(String[] args) { //输出1~100 int i = 0; while (i<100){ i++; System. 阅读全文
posted @ 2022-01-07 22:47 追风的羊 阅读(110) 评论(0) 推荐(0)
摘要: Switch 选择结构 package zaiyang.struct; public class SwitchDemo01 { public static void main(String[] args) { //case穿透 //switch 匹配一个具体的值 char grade = 'A'; 阅读全文
posted @ 2022-01-07 21:20 追风的羊 阅读(51) 评论(0) 推荐(0)
上一页 1 ··· 3 4 5 6 7 8 9 下一页