[英]Problem obtaining web service response
I made a web service REST in .NET which is succesfully conected with the app made in android, but the problem is that when I want to obtain the response, String in this case, I can't compare it inside the android app. I made a web service REST in .NET which is succesfully conected with the app made in android, but the problem is that when I want to obtain the response, String in this case, I can't compare it inside the android app.
The problem is that if I've got res
as my web service response, with a value of "Err"
and I do:问题是,如果我有res
作为我的 web 服务响应,值为"Err"
,我会:
if (res == "Err")
It just says they do not match.它只是说它们不匹配。 What could be the problem?可能是什么问题呢?
Comparing strings in Java:比较 Java 中的字符串:
if(res.equals("Err")) {
// equals
}
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.