class Demo_Student{
public static void main(String[] args) {
Student s = new Student();
s.name="张三";
s.age=23;
s.gender="男";
s.say();
}
}
class Student{
String name;
int age;
age=10;
String gender;
public void say(){
System.out.println(name+"\t"+gender+"\t"+age);
}
} |
|