default, public, protected, private

default (package private – access in other classes within the same package)

public (visible everywhere)

protected (only access in its own class, its subclass and other classes within the same package)

private (only access in its own class)

http://docs.oracle.com/javase/tutorial/java/javaOO/accesscontrol.html

Access Levels
Modifier Class Package Subclass World
public Y Y Y Y
protected Y Y Y N
no modifier Y Y N N
private Y N N N

 

Midterm

유형: 필기시험
범위: 처음부터 배운데까지
일시: 2026년 4월 23일(목) 18:00-19:00
장소: 인문관 209호