IT/Java
[Error] incompatible types / Type mismatch
성준하이
2024. 8. 1. 10:12
반응형
아래와 같은 에러가 발생하였다.
[Java] java: incompatible types: byte[] cannot be converted to byte
그밖에도 다양하게 에러는 발생할 수 있다.
ex>
incompatible types: String cannot be converted to boolean
incompatible types: String cannot be converted to Integer
형 변환이 불가능하다는 의미이고,
형태를 변경해주면 해결된다.
비슷하게 컴파일에 나올수 있는 에러로
Type mismatch: cannot convert from element type Integer to ArrayList<Integer>
이런 에러도 있다.
동일하게 형태가 변경이 불가능하다는 의미로
위와 동일하게 해결 가능하다.
반응형