Java???????????
???????????? ???????[ 2015/8/19 13:52:32 ] ??????????????????? ????????
????java?????????????????????????????????java???????????????????????????????????????
????????class??object?????????????object?????class????????class???????object??
????java??????????“????”??????????????????????????????????Person??
public class Person {
public int age;//????
public String name;//????
public int hight;//???
public int weight;//????
public Person(){
}
public Person(int age??String name??int hight??int weight){
this.age = age;
this.name = name;
this.hight = hight;
this.weight = weight;
}
public void doSth(){
//doSomething
}
}
?????????????????????????????????壬???“???”????Person??????????????????????????????????????????
?????????????????????????£?
????1???????????????????????????????е????/????????????????????????????????????????????“Person?????”?????????????????????????塣?????????????????????????
????2???????????????????
??????????????????????????
????3?????????????????????Я?????????????????????????????????????????????????????С?
????4????????????????????????????????б??????????????????????????????????????????????????????????????????????
??????????????????????÷????????
public class classAndObject {
//???????
public static void staticTest (){
System.out.println("????????????");
}
//???????
public void dynamicTest() {
System.out.println("????????????");
}
public static void main(String[] args) {
classAndObject.staticTest();//???
classAndObject t = new classAndObject();
t.dynamicTest();//???????????????“????.????”????????????????????????????????????????????á?
t.staticTest(); //?????????棺The static method staticTest() from the type classAndObject should be accessed in a static way
//???????????????????????????????ò????????????????????????“??.???????”
??????
???·???
??????????????????
2023/3/23 14:23:39???д?ò??????????
2023/3/22 16:17:39????????????????????Щ??
2022/6/14 16:14:27??????????????????????????
2021/10/18 15:37:44???????????????
2021/9/17 15:19:29???·???????·
2021/9/14 15:42:25?????????????
2021/5/28 17:25:47??????APP??????????
2021/5/8 17:01:11