자바 Java 변수 비교, 문자열 비교 간단 구현


자바 Java 변수 비교, 문자열 비교 간단 구현

문자열 비교 String str1 = "Hello"; String str2 = "hello"; String str3 = "Hello"; if (str1.equals(str2)) { System.out.println("str1 is equal to str2"); } else { System.out.println("str1 is not equal to str2"); } if (str1.equals(str3)) { System.out.println("str1 is equal to str3"); } else { System.out.println("str1 is not equal to str3"); } 변수 비교 int num1 = 5; int num2 = 7; if (num1 == num2) { System.o..


원문링크 : 자바 Java 변수 비교, 문자열 비교 간단 구현