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
Back to top