摘要: package com.study2; //静态导入,就可以不用加Math类 import static java.lang.Math.*; public class Math_test { public static void main(String[] args) { System.out.pr 阅读全文
posted @ 2021-02-26 17:29 别看我看路 阅读(37) 评论(0) 推荐(0) 编辑
摘要: package com.study2; import java.util.Date; import com.mianxiangduixiang.*;//导包:就是为了进行定位 public class Test { public static void main(String[] args) { / 阅读全文
posted @ 2021-02-26 17:07 别看我看路 阅读(50) 评论(0) 推荐(0) 编辑
摘要: 【1】类的组成:属性,方法,构造器,代码块,内部类 【2】代码块分类:普通块,构造块,静态块,同步块(多线程) 【3】代码: package com.study1; public class test { int a; static int sa; public static void main(S 阅读全文
posted @ 2021-02-26 16:36 别看我看路 阅读(65) 评论(0) 推荐(0) 编辑
摘要: package com.gouzao; public class Static_function { int id; static int sid; public void a() { System.out.println(id); System.out.println(sid); System.e 阅读全文
posted @ 2021-02-26 16:19 别看我看路 阅读(60) 评论(0) 推荐(0) 编辑
摘要: 类: package com.gouzao; public class Person3 { int id; static int sid; public static void main(String[] args) { Person3 ps1 = new Person3(); ps1.id = 1 阅读全文
posted @ 2021-02-26 16:06 别看我看路 阅读(63) 评论(0) 推荐(0) 编辑
摘要: package com.gouzao; public class Person2 { String name; int age; double hight; double weight; public Person2() { } public Person2(String name,int age, 阅读全文
posted @ 2021-02-26 13:38 别看我看路 阅读(55) 评论(0) 推荐(0) 编辑
摘要: 类: public class Person1 { String name; int age; double height; public Person1() { } //构造器的重载 public Person1(String name,int age,double height) { //当形参 阅读全文
posted @ 2021-02-26 00:25 别看我看路 阅读(48) 评论(0) 推荐(0) 编辑