프로그래밍/자바, JDBC
문자열 비교(equals)
현호s
2020. 4. 23. 09:51
반응형
class Main {
public static void main(String[] args) {
String str1 = "Hello world";
String str2 = "Hello world";
if ( str1.equals(str2) ) {
System.out.println("동일한 값을 가지고 있습니다.");
}
else {
System.out.println("다른 값을 가지고 있습니다.");
}
}
}
반응형