diff --git a/Student.java b/Student.java index 815ec04c7b6747bac25bec4d46ee9e37f5653691..4dbcdceda3925e4f7cbd34ca305c54d8e83e8023 100644 --- a/Student.java +++ b/Student.java @@ -2,6 +2,23 @@ public class Student { private String name; + private int age; + private int weight; + private int height; + public Student(String name, int age, int weight, int height) { + this.name = name; + this.age = age; + this.weight = weight; + this.height = height; + } + public String toString() { + return "Student{" + "name='" + name + '\'' + ", age=" + age + ", weight=" + weight + ", height=" + height + '}'; + } + + public static void main(String[] args) { + Student student = new Student("lisi",11,120,180); + System.out.println(studnet); + } } \ No newline at end of file