package test;
public class Human {
String name;
char sex;
int age;
float height;
float weight;
public Human(String Name,char Sex,int Age){
this.name=Name;
this.sex=Sex;
this.age=Age;
}
public void information(){
System.out.println(name+"\n"+sex+"\n"+age);
}
public void eat(){
System.out.println("eat food");
}
public static void main(String[] args){
new Human("李建",‘男‘,18);
}
}javaplus
原文:http://www.cnblogs.com/jgrs/p/7750173.html