계산기 응용 프로그램을 만들려고하는데 문제가 있습니다. (null)
은 주황색으로 표시되어 있습니다. .equals (null)은 의도 한 것과 다를 수 있습니다. . 내가 뭘해야하니?.equals (null)은 의도 한 바가 아님
case R.id.equal: if(!optr.equals(null)){
if(op2 != 0){
if(optr.equals("+")){
disp.setText(""); /*op1 = op1 + op2;*/
disp.setText("Result : " + Integer.toString(op1));
시도'.equals ("") ' –
방법 https://commons.apache.org/proper/commons-lang/javadocs/api-2.6/org/apache에 대해 :이 경우,
TextUtils.isEmpty()
사용 /commons/lang/StringUtils.html#isBlank%28java.lang.String%29 – Ambrish'optr'을 정확히 확인 하시겠습니까? 'null', 빈 문자열 (""), 빈 문자열 등? – cygery