Day02 [예제] 문자열 동등성 비교의 결과차이
효기’s
package test; public class study03 { public static void main(String[] args) { //String str1 = "Superman"; //String str2 = "Superman"; String str1 = new String("Superman"); String str2 = new String("Superman"); if(str1.equals(str2)) { System.out.println("Same"); }else { System.out.println("diff"); } if(str1 == str2){ System.out.println("Same"); }else { System.out.println("diff"); } } } Q. 주석처리한 부..