Learned a lot of knowledge java today,one of my classmates joked ,there id a lot of knowledge about one day in school,certainiy,learning here is better than school.in here than the school had a full.
NOTES
class expert //定义一个类
{ //里面有名字 性别 年龄属性 还有鉴定电脑
String name;
int age;
String sex;
void function(){
System.out.println("鉴定电脑 买电脑");
}
public static void main(String[] args){
expert expert=new expert();
expert.name="小风"; //
expert.age=24;
expert.sex="男";
System.out.println(expert.name+" "+expert.age+" "+expert.sex);
expert.function();
Computerman com=new Computerman();
//com.name="小明";
com.setName("小明");
System.out.println(com.getName());
com.identificationcomputer();
}
}
class Computerman //定义一个类 对象???
{ //里面有名字 性别 年龄属性 还有鉴定电脑
private String name;
private int age;
private String sex;
public void setName(String name){
this.name=name;
}
public String getName(){
return name;
}
void identificationcomputer(){
int a=1;
System.out.println(name+"鉴定电脑");
System.out.println(name+"买电脑");
}
}
This is notes, is also a life, and grow。