Download IO_stream_project/Object_stream_module/src/case_package/Student.java from zxy0307/Java: direct link, hf CLI and curl.
- Browser
- Download file 1.18 kB
-
https://huggingface.co/zxy0307/Java/resolve/main/IO_stream_project/Object_stream_module/src/case_package/Student.java
- Command line
-
hf download hf://zxy0307/Java/IO_stream_project/Object_stream_module/src/case_package/Student.java
-
curl -L -o Student.java https://huggingface.co/zxy0307/Java/resolve/main/IO_stream_project/Object_stream_module/src/case_package/Student.java
1.18 kB
| package case_package; | |
| import java.io.Serializable; | |
| public class Student implements Serializable { | |
| private String name; | |
| private int age; | |
| private String address; | |
| public Student() { | |
| } | |
| public Student(String name, int age, String address) { | |
| this.name = name; | |
| this.age = age; | |
| this.address = address; | |
| } | |
| /** | |
| * 获取 | |
| * @return name | |
| */ | |
| public String getName() { | |
| return name; | |
| } | |
| /** | |
| * 设置 | |
| * @param name | |
| */ | |
| public void setName(String name) { | |
| this.name = name; | |
| } | |
| /** | |
| * 获取 | |
| * @return age | |
| */ | |
| public int getAge() { | |
| return age; | |
| } | |
| /** | |
| * 设置 | |
| * @param age | |
| */ | |
| public void setAge(int age) { | |
| this.age = age; | |
| } | |
| /** | |
| * 获取 | |
| * @return address | |
| */ | |
| public String getAddress() { | |
| return address; | |
| } | |
| /** | |
| * 设置 | |
| * @param address | |
| */ | |
| public void setAddress(String address) { | |
| this.address = address; | |
| } | |
| public String toString() { | |
| return "Student{name = " + name + ", age = " + age + ", address = " + address + "}"; | |
| } | |
| } | |