Download IO_stream_project/Case_module/src/case_package1/Student.java from zxy0307/Java: direct link, hf CLI and curl.
- Browser
- Download file 1.46 kB
-
https://huggingface.co/zxy0307/Java/resolve/main/IO_stream_project/Case_module/src/case_package1/Student.java
- Command line
-
hf download hf://zxy0307/Java/IO_stream_project/Case_module/src/case_package1/Student.java
-
curl -L -o Student.java https://huggingface.co/zxy0307/Java/resolve/main/IO_stream_project/Case_module/src/case_package1/Student.java
1.46 kB
| package case_package1; | |
| public class Student { | |
| private String name; | |
| private String gender; | |
| private int age; | |
| private double weight; | |
| public Student() { | |
| } | |
| public Student(String name, String gender, int age, double weight) { | |
| this.name = name; | |
| this.gender = gender; | |
| this.age = age; | |
| this.weight = weight; | |
| } | |
| /** | |
| * 获取 | |
| * | |
| * @return name | |
| */ | |
| public String getName() { | |
| return name; | |
| } | |
| /** | |
| * 设置 | |
| * | |
| * @param name | |
| */ | |
| public void setName(String name) { | |
| this.name = name; | |
| } | |
| /** | |
| * 获取 | |
| * | |
| * @return gender | |
| */ | |
| public String getGender() { | |
| return gender; | |
| } | |
| /** | |
| * 设置 | |
| * | |
| * @param gender | |
| */ | |
| public void setGender(String gender) { | |
| this.gender = gender; | |
| } | |
| /** | |
| * 获取 | |
| * | |
| * @return age | |
| */ | |
| public int getAge() { | |
| return age; | |
| } | |
| /** | |
| * 设置 | |
| * | |
| * @param age | |
| */ | |
| public void setAge(int age) { | |
| this.age = age; | |
| } | |
| /** | |
| * 获取 | |
| * | |
| * @return weight | |
| */ | |
| public double getWeight() { | |
| return weight; | |
| } | |
| /** | |
| * 设置 | |
| * | |
| * @param weight | |
| */ | |
| public void setWeight(double weight) { | |
| this.weight = weight; | |
| } | |
| public String toString() { | |
| return name + "-" + gender + "-" + age + "-" + weight; | |
| } | |
| } | |