public class StudentTest {
/**
* @param args
*/
public static void main(String[] args) {
// TODO Auto-generated method stub
Student sy = new Student();
sy.study();
}
}
class Student {
String name = "张三";
String stuNo = "123456789";
String sex= "女";
String stuClass = "计134-3";
float score=99;
void study() {
System.out.println("名字:" + name);
System.out.println("学号:" + stuNo);
System.out.println("性别:" + sex);
System.out.println("班级:" + stuClass);
System.out.println("成绩:"+score);
}
}
学生类
最新推荐文章于 2022-05-18 18:57:48 发布