摘要:
面向对象 构造器 构造器:1、和类名同名 2、没有返回值 package com.beijing.xiaowen.oop; public class Person { int age; String name; //默认构造器,一般都存在 //使用new关键字,本质是构造器 //无参构造器作用: / 阅读全文
posted @ 2022-10-20 23:41
Always_0708
阅读(19)
评论(0)
推荐(0)
摘要:
package com.beijing.xiaowen.Array; import java.util.Arrays; public class Test01 { public static void main(String[] args) { //冒泡排序 int[] abc = {3,5,1,6 阅读全文
posted @ 2022-10-20 02:25
Always_0708
阅读(15)
评论(0)
推荐(0)
摘要:
package com.beijing.xiaowen.methods; import java.util.Scanner; public class Test01 { public static void main(String[] args) { int a = 0; int b = 0; St 阅读全文
posted @ 2022-10-20 01:22
Always_0708
阅读(28)
评论(0)
推荐(0)
摘要:
可变参数 package com.beijing.xiaowen.methods; public class Demo01 { public static void main(String[] args) { method01(1,2,4,1); } //可变参数,即在参数类型后 用... 表示 / 阅读全文
posted @ 2022-10-20 00:58
Always_0708
阅读(21)
评论(0)
推荐(0)
摘要:
for 循环联系题 计算0-50的奇数和偶数的和 package com.beijing.xiaowen.scanner; public class Test01 { public static void main(String[] args) { //计算0-50的奇数和偶数的和 int a = 阅读全文
posted @ 2022-10-20 00:25
Always_0708
阅读(34)
评论(0)
推荐(0)

浙公网安备 33010602011771号