MCPcopy Create free account
hub / github.com/Firebasky/Java / Person

Class Person

SnakeYaml/src/main/java/learn/Person.java:6–34  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4import java.time.Period;
5
6public class Person {
7 public String name;
8
9 public Person(){
10 }
11 public Person(String name){
12 System.out.println(name);
13 }
14
15 public String getName() {
16 System.out.println("get方法");
17 return name;
18 }
19
20 public void setName(String name) {
21 System.out.println("set方法");
22 this.name = name;
23 }
24
25 public int getAge() {
26 return age;
27 }
28
29 public void setAge(int age) {
30 this.age = age;
31 }
32
33 public int age;
34}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected