1
2
3
4
5
6
7
8
9
package HomeWorkReview;
public class Test {
public int no; // 동그라미 - 초록
protected String name; // 마름모 - 노랑
int salary; // 세모 - 파랑
private String grade; // 네모 - 빨강
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
package HomeWorkReview;
import SuperSub.Employee;
// import SuperSub.One; One의 접근제한자가 public이 아니라 defalut라서 다른 패키지접근 불가능
public class TestMain {
public static void main(String[] args) {
Employee e = new Employee();
// One one = new One(); // One class는 defalut형
}
}