어느 가을날의 전환점
JAVA|Error - Incompatible operand types Integer and int 본문
JDK 1.5 에서는 Autoboxing 기능이 추가됐다.
Object와 primitive type 간에 형변환이 자동이다.
- Incompatible operand types Boolean and boolean
- Incompatible operand types Integer and int.
<오류발생> : Incompatible operand types Integer and int.
if (ds.getColumnAsInteger(i, "SELE_CHEK") == 1) {
<해결방안> : JDK 1.4에서는 Autoboxing 기능이 없어서 명시적 변환 필요.
if (ds.getColumnAsInteger(i, "SELE_CHEK").intValue() == 1) {
'Development' 카테고리의 다른 글
| 용어|SPM(Standard and Procedure Manual, 표준 및 절차 메뉴얼) (0) | 2010.05.04 |
|---|---|
| 용어|테일러링(Tailoring) (0) | 2010.05.04 |
| DEBUG|Debugging Tools for Windows - Overview (0) | 2010.01.22 |
| JavaScript|브라우저(Browser) 닫기(Close) 스크립트 (0) | 2010.01.15 |
| JAVA|Function - AddComma() : 숫자 자릿수 콤마 추가 (0) | 2009.12.29 |
Comments