开发者

The following code not working in android?

details.r开发者_JAVA百科eplaceAll("null", " ");

In the above code i am getting the String details from the database and it may get values of the form : null,null,null,null.

In order to remove all the "null" from the string i am using the above code, but it is not working.

what is going wrong?

thank you in advance.


replaceAll will not change the String itself, but return a new String with the replacements made. You must assign the return value to get your code to work:

details = details.replaceAll("null", " ");
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜