String문 비교할 때, 아래와 같은 구문을 쉽게 볼 수 있다. 1. if (str != null && str.equals("true")) { } 2. if (str != null && "true".equals(str)) { } 3. if ( (str1 != null && str2 != null) && str1.equals(str2)) {} 1번에 비해서 2번이 낮다, 그리고 변수가 2개가 되면 3번이 된다. 뭘 어떻게 봐도.. 구리다.. 이럴 땐 아래와 같이 쓰면 된다. 쉽고 간단하고 안전하다. if( Objects.equals(str1, str2)) { } 원형 : public static boolean equals(Object a, Object b) { return (a == b) || (a !=..