나는 간단한 if 문을 사용하여 할려고? 무늬. "진술 아님"- 오류가 발생했습니다. 누군가 정상적인 if 문을 사용하여 이런 일이 일어나지 않는 이유를 설명해 줄 수 있습니까?아니 계책 (컴파일러 오류 자바/안드로이드)
오류 :
cursor.isNull(0) ? insert_SQL_RSServer.bindNull(0) : insert_SQL_RSServer.bindLong(0, cursor.getLong(0)); // id
없음 오류 없습니다 :
if(cursor.isNull(0))
insert_SQL_RSServer.bindNull(0);
else
insert_SQL_RSServer.bindLong(0, cursor.getLong(0));
이 완전히 같은 동작입니다 ....
결과를 변수에 지정해야합니다. – Raghavendra
'insert_SQL_RSServer.bindNull (0)'과'insert_SQL_RSServer.bindLong (0, cursor.getLong (0))'은 리턴 타입을 가져야합니다 .. 당신의 경우에는 무효 여야합니다 .. – Sanoop