[Java] import static
2023. 9. 14. 16:47ㆍJava
import static은 클래스의 static method나 변수를 클래스명을 붙이지 않고 사용하도록 해준다.
ex)
import static org.assertj.core.api.Assertions.*;
# assertThat으로 사용 가능
# 원래는 Assertions.assertThat으로 사용해야함
'Java' 카테고리의 다른 글
[Java] private static에 대한 나름의 이해 (0) | 2023.09.16 |
---|---|
[Java] final 예약어 (0) | 2023.09.14 |
[Java] <>에 대한 나름의 이해 (0) | 2023.09.13 |
[Java] lambda 식에 대한 나름의 이해 (0) | 2023.09.08 |
[Java] synchronized에 대해서 모르겠는 점 (0) | 2023.09.08 |