오류잡기
[Java] the public type ~ must defined in its own file
칸쵸.
2023. 9. 26. 15:52
728x90
연습 문제 따라서 잘 하고있었는데 대체 뭐가 문제지..? 하던 찰나
The public type SmartTV must be defined in its own file
> public type SmartTV는 자체 파일로 정의해야 된다..?
결론
1. 클래스명과 파일명을 일치하지 않거나
2. 파일명과 일치하지 않는 클래스에 public 키워드를 붙일 때
발생하는 오류였다.