| 目次 |
|---|
|
・String型とObject型の比較 ・検証 ・検証結果 |
public class Test {
public static void main(String[] args) {
Object obj = "0";
String str = new String("0");
if(obj.equals(str)){
System.out.println("true");
}else{
System.out.println("false");
}
}
}
true