Seventh records of career

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。

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值