【发布时间】:2015-06-11 03:49:17
【问题描述】:
我有这个代码:
String string = "40' & 40' HC";
if(string.matches("&"))
System.out.println("Found");
但条件不成立。为什么? 帮助表示赞赏。谢谢
【问题讨论】:
-
不清楚 - 哪个条件不成立?
-
应该使用
string.contains("&")
标签: java string variables match