摘要: 1 package com.lin.method; 2 3 public class Demo3 { 4 public static void main(String[] args) { 5 //args.length 数组长度 6 for (int i = 0; i < args.length ; 阅读全文
posted @ 2021-02-13 18:43 奔啵儿灞 阅读(81) 评论(0) 推荐(0)
摘要: 1 package com.lin.method; 2 3 public class Demo2 { 4 public static void main(String[] args) { 5 //一个方法的签名只与参数和方法名有关,方法名一样,参数名不一致则为重载,与返回值无关 6 int max 阅读全文
posted @ 2021-02-13 17:00 奔啵儿灞 阅读(60) 评论(0) 推荐(0)
摘要: 1 package com.lin.method; 2 3 public class Demo1 { 4 //main方法 5 public static void main(String[] args) { 6 //实际参数:实际调用传递给他的参数 7 int sum = add(1, 2); 8 阅读全文
posted @ 2021-02-13 16:05 奔啵儿灞 阅读(53) 评论(0) 推荐(0)
摘要: 1 package com.lin.method; 2 3 public class Demo1 { 4 //main方法 5 public static void main(String[] args) { 6 int sum = add(1, 2); 7 System.out.println(s 阅读全文
posted @ 2021-02-13 15:51 奔啵儿灞 阅读(45) 评论(0) 推荐(0)
摘要: 1 package com.lin.struct; 2 3 public class BreakDemo { 4 public static void main(String[] args) { 5 int i=0; 6 while (i<100){ 7 i++; 8 System.out.prin 阅读全文
posted @ 2021-02-13 15:29 奔啵儿灞 阅读(96) 评论(0) 推荐(0)
摘要: 1 package com.lin.struct; 2 //主要用于数组和集合 3 public class ForDemo5 { 4 public static void main(String[] args) { 5 int[] numbers={10,20,30,40,50};//定义了一个数 阅读全文
posted @ 2021-02-13 12:59 奔啵儿灞 阅读(52) 评论(0) 推荐(0)