[Java_Error] Syntax error, insert "Dimensions" to complete ReferenceType
·
Trouble Shooting(Error)
- 에러 코드 : HashSet hs = new HashSet(); - 에러메시지 : Unresolved compilation problem: Syntax error, insert "Dimensions" to complete ReferenceType - 해석 : 문법적으로 자료형을 넣을 수 있는 건 참조형이다. 기본형은 안되고, 참조형을 집어넣어라 - 해결방안 : int를 Integer 래퍼클래스로 바꾸기 HashSet hs = new HashSet();
[Java_Error] Implicit super constructor (class 이름) is undefined. Must explicitly invoke another constructor
·
Trouble Shooting(Error)
Implicit super constructor (class 이름) is undefined. Must explicitly invoke another constructor ex) Exception in thread "main" java.lang.Error: Unresolved compilation problem: Implicit super constructor Calculatorclass() is undefined. Must explicitly invoke another constructor > 에러 발생 이유 : 암시적으로 부모 클래스에 (class 이름)라는 생성자가 정의되어 있지 않아서 발생 > 해결 방법 : super를 사용하여 해결 또는 생성자를 명시적으로 정의 필요 -> public 클래스 이름..
[Java_Error] java.io.FileNotFoundException
·
Trouble Shooting(Error)
java.io.FileNotFoundException > 에러 발생 이유 : 파일의 위치에 문제가 있거나 파일의 이름에 문제가 있을 경우 발생 > 해결 방법 : bin과 src 폴더가 있는 디렉토리 경로에 파일 위치시키기 / 프로젝트와 같은 폴더 위치 파일명을 *.txt으로 저장하면 Eclipse가 *.txt.txt로 읽어서 파일을 찾지 못할 수 있으니 파일의 이름에 .txt를 지우기
[Java_Error] Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException
·
Trouble Shooting(Error)
Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException ex) Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: Index 5 out of bounds for length 4 at ForeachDemo.main(ForeachDemo.java:10) > 에러 발생 이유 : 배열이 가지고 있지 않은 인덱스를 가지고 오려고 할 때 발생하는 오류 > 길이가 4인 배열에서 인덱스 5 값을 가지고 오려해서 발생하는 오류 > 해결 방법 : 배열의 length를 확인 후 인덱스 값을 변경하기
[Java_Error] Type mismatch: cannot convert from double to int
·
Trouble Shooting(Error)
Type mismatch: cannot convert from 자료형 to 자료형 ex) Type mismatch: cannot convert from double to int > 에러 발생 이유 : 데이터의 형식이 일치하지 않는다. > 해결 방법 : 데이터 형식을 똑같이 맞춰주면 된다.