| 1 | package com.firebasky.learn; |
| 2 | |
| 3 | public class Man { |
| 4 | public int age; |
| 5 | public String name; |
| 6 | |
| 7 | public Man(){ |
| 8 | System.out.println("无参数构造方法"); |
| 9 | } |
| 10 | |
| 11 | public Man(int age, String name) { |
| 12 | System.out.println("有参数构造方法"); |
| 13 | this.age = age; |
| 14 | this.name = name; |
| 15 | } |
| 16 | public int getAge() { |
| 17 | return age; |
| 18 | } |
| 19 | public void setAge(int age) { |
| 20 | this.age = age; |
| 21 | } |
| 22 | |
| 23 | public String getName() { |
| 24 | System.out.println("get方法"); |
| 25 | return name; |
| 26 | } |
| 27 | |
| 28 | public void setName(String name) { |
| 29 | System.out.println("set方法"); |
| 30 | this.name = name; |
| 31 | } |
| 32 | } |
nothing calls this directly
no outgoing calls
no test coverage detected