본문 바로가기
Class/220729

Class(2-2)

by pms93 2022. 7. 31.
package inheritance7;

public abstract class Employee {

	private String name;
	public Employee() {}
	
//	public Employee(String name) {
//		this.name = name;
//	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}
	
	public int getSalary() {
		return 0;
	}

//	public abstract int getSalary();
}

'Class > 220729' 카테고리의 다른 글

Class(2-4)  (0) 2022.07.31
Class(2-3)  (0) 2022.07.31
Class(2-1)  (0) 2022.07.31
Class(1-5)  (0) 2022.07.31
Class(1-4)  (0) 2022.07.31