对象
来源:互联网 发布:手机淘宝客软件 编辑:程序博客网 时间:2024/05/01 22:16
package com.ufe01;
public class Laoshi {
//私有化成员变量
private String name;
private int age;
protected String prelect;
//提供有参无参构造
public Laoshi(){}
public Laoshi(String name,int age,String prelect){
this.name=name;
this.age=age;
this.prelect =prelect;
}
//提供set/get方法
public void setName(String name){
this.name = name;
}
public String getName(){
return name;
}
public void setAge(int age){
this.age = age;
}
public int getAge(){
return age;
}
public void setPrelect(String prelect){
this.prelect = prelect;
}
public String getPrelect(){
return prelect;
}
//讲课的抽象方法
public void prelect() {
}
}
0 0
- 对象
- 对象
- 对象
- 对象
- 对象
- 对象
- 对象
- 对象
- 对象
- 对象
- 对象
- 对象
- 对象
- 对象
- 对象
- 对象
- 对象
- 对象
- Android Listview数据显示
- 动态规划:最大上升子序列和
- python基于文件操作
- c实现的算法
- 程序的本质复杂性和元语言抽象
- 对象
- lightoj-1029-Civil and Evil Engineer(最小生成树+克鲁斯卡尔算法)
- js 和ajax 提交给服务器端的代码, 验证输入值符不符合,验证服务器传递过来的值 thinkphp
- Go实战--go语言中执行shell脚本(The way to go)
- Servlet知识点
- 强化学习进阶 第七讲 TRPO
- java中四种引用类型(对象的强、软、弱和虚引用)
- Android Adapter,UI界面更新
- C++实现简单的走迷宫