I have some json like [{"person":"123abc"}]
in variable JSON_STRING
i try parse json to string like this
JSONObject person = (new JSONObject(JSON_STRING));
String name = person.getString("person");
String test= "123abc";
if(name == test){
System.out.print("Success");
}else{
System.out.print("Fail");
}
I make some simple logic with if else but i have some problem variable name
and test
not same because result Fail
. I don't know why content variable name
and test
considered not same. Please help if anyone have some solution.
Thanks