05 2022 档案

摘要:四、Arrays 一、冒泡排序 //测试类 public class test { public static void main(String[] args) { int[]arr={24,35,46,54,32,13,21,23,34,45,56}; System.out.println("排序 阅读全文
posted @ 2022-05-08 20:37 yesyes1 阅读(30) 评论(0) 推荐(0)
摘要:常用API相关知识 一、Math (不能创建对象) Math包含执行基本数字运算的方法 Math类的常用方法: public static int abs(int a)--返回参数的绝对值 System.out.println(Math.abs(-12)); //输出12 public static 阅读全文
posted @ 2022-05-04 19:20 yesyes1 阅读(25) 评论(0) 推荐(0)
摘要:六、内部类 即在类中定义一个类 格式: public class 类名 { 修饰符 class 类名//内部类 { } } 注意:、 内部类可以直接访问外部类的成员,包括私有成员; 而外部类若想要访问内部类的成员,必须创建对象; 范例: public class outer { private in 阅读全文
posted @ 2022-05-03 21:56 yesyes1 阅读(21) 评论(0) 推荐(0)
摘要:各位小伙伴们,不好意思啦,昨天缺席上线了,近两天会重新补好。 这次分享的内容是类名和接口名作为形参和返回值时的不同情况,希望能够带来一些帮助啊! 一、类名作为形参 //测试类 public class test { public static void main(String[] args) { a 阅读全文
posted @ 2022-05-02 20:06 yesyes1 阅读(22) 评论(0) 推荐(0)