Constructor

public class Constructor {
boolean t;
byte b;
short s;
int i;
long l;
float f;
double d;
char c;
Constructor(){
t=true;
b=12;
s=99;
i=49;
l=120;
f=3.14f;
d=3.1415;
c='h';
}

public static void main(String[] args) {
// TODO 自动生成的方法存根
Constructor initiate;
initiate =new Constructor();
System.out.println(initiate.t);
System.out.println(initiate.b);
System.out.println(initiate.s);
System.out.println(initiate.i);
System.out.println(initiate.l);
System.out.println(initiate.f);
System.out.println(initiate.d);
System.out.println(initiate.c);

 


}

}

posted @ 2017-03-16 17:29  大仁哥汪宝  阅读(163)  评论(0编辑  收藏  举报