徐再旭的博客将所有值复制到Set< String>然后使用contains():Set set = new HashSet (Arrays.... }[编辑]如果要查明该行的一部分是否包含该集合中的字符串,则必须循环该集合.将set.contains(line)替换为:public boolea...
鲁朗的博客有一个String,如何查询其中是否有y和f字符?最黑暗的办法就是:程序1:我知道if、for语句和charAt()class Test{public static void main(String args[]) {String str="For my money, the important thing "+"about ...