public class PoorDog {
private byte b;
private char c;
private short length;
private int size;
private long l;
private boolean aBoolean;
private float f;
private double d;
private String name;
public byte getB() {
return b;
}
public void setB(byte b) {
this.b = b;
}
public char getC() {
return c;
}
public void setC(char c) {
this.c = c;
}
public short getLength() {
return length;
}
public void setLength(short length) {
this.length = length;
}
public int getSize() {
return size;
}
public void setSize(int size) {
this.size = size;
}
public long getL() {
return l;
}
public void setL(long l) {
this.l = l;
}
public boolean isaBoolean() {
return aBoolean;
}
public void setaBoolean(boolean aBoolean) {
this.aBoolean = aBoolean;
}
public float getF() {
return f;
}
public void setF(float f) {
this.f = f;
}
public double getD() {
return d;
}
public void setD(double d) {
this.d = d;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public static void main(String[] args) {
PoorDog pd = new PoorDog();
/**
byte: 0
char:
short: 0
int: 0
long: 0
boolean: false
float: 0.0
double: 0.0
name: null
*/
System.out.println("byte:"+pd.getB());
System.out.println("char:"+pd.getC());
System.out.println("short:"+pd.getLength());
System.out.println("int:"+pd.getSize());
System.out.println("long:"+pd.getL());
System.out.println("boolean:"+pd.isaBoolean());
System.out.println("float:"+pd.getF());
System.out.println("double:"+pd.getD());
System.out.println("name:"+pd.getName());
}
}
参与评论
您还未登录,请先
登录
后发表或查看评论
08-04
150

05-06
4万+

“相关推荐”对你有帮助么?
-
非常没帮助
-
没帮助
-
一般
-
有帮助
-
非常有帮助
提交