如何判断一个字符串中包含有某个符号(#) String str="123#abc";int i = str.indexOf("#");if(i>0){ sysout("包含有#号");}if(i==-1){ sysout("不包含有#号");}