Download Reflect_project/Case_module/src/case_package1/Teacher.java from zxy0307/Java: direct link, hf CLI and curl.
- Browser
- Download file 827 Bytes
-
https://huggingface.co/zxy0307/Java/resolve/main/Reflect_project/Case_module/src/case_package1/Teacher.java
- Command line
-
hf download hf://zxy0307/Java/Reflect_project/Case_module/src/case_package1/Teacher.java
-
curl -L -o Teacher.java https://huggingface.co/zxy0307/Java/resolve/main/Reflect_project/Case_module/src/case_package1/Teacher.java
827 Bytes
| package case_package1; | |
| public class Teacher { | |
| private String name; | |
| private double salary; | |
| public Teacher() { | |
| } | |
| public Teacher(String name, double salary) { | |
| this.name = name; | |
| this.salary = salary; | |
| } | |
| /** | |
| * 获取 | |
| * @return name | |
| */ | |
| public String getName() { | |
| return name; | |
| } | |
| /** | |
| * 设置 | |
| * @param name | |
| */ | |
| public void setName(String name) { | |
| this.name = name; | |
| } | |
| /** | |
| * 获取 | |
| * @return salary | |
| */ | |
| public double getSalary() { | |
| return salary; | |
| } | |
| /** | |
| * 设置 | |
| * @param salary | |
| */ | |
| public void setSalary(double salary) { | |
| this.salary = salary; | |
| } | |
| public String toString() { | |
| return "Teacher{name = " + name + ", salary = " + salary + "}"; | |
| } | |
| } | |