반응형
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("다른 값을 가지고 있습니다.");
        }
	} 
}
반응형

+ Recent posts