Java??????????Щ????
???????????? ???????[ 2014/7/8 10:35:58 ] ????????Java
???????дJava?????У?????????????????????Щ????????????Щ???????????????????????????????Щ???????????????£?
????1.?ж?????{"a"??"b"??"c"??"d"}????????"a"???????′??????????????????????????ifcontainsByArrays??????÷????????????Щ??
public static void main(String[] args) {
String [] strs = {"a"??"b"??"c"??"d"};
Test t = new Test();
System.out.println(t.ifcontains(strs?? "a"));
System.out.println(t.ifcontainsByArrays(strs?? "a"));
}
public boolean ifcontains(String [] strs?? String str) {
for (String s : strs) {
if (s.equals(str)) {
return true;
}
}
return false;
}
public boolean ifcontainsByArrays(String [] strs?? String str) {
// ???Arrays.asList()??????????? java.util.Arrays.ArrayList??????java.util.ArrayList
return Arrays.asList(strs).contains(str);
}
|
????2.??????????????б??е??????????′???????????removeByIterator????????????????????μ?list??
public static void main(String[] args) {
List<String> list = new ArrayList<String>(Arrays.asList("a"?? "b"?? "c"?? "d"));
List<String> list1 = new ArrayList<String>(Arrays.asList("a"?? "b"?? "c"?? "d"));
Test1 t = new Test1();
for (String s : t.removeByIterator(list?? "c")) {
System.out.print(s);
}
System.out.println();
System.out.println("----------------------------");
for (String s : t.removeByNewList(list1?? "c")) {
System.out.print(s);
}
}
public List<String> removeByNewList(List<String> list?? String str) {
List<String> newList = new ArrayList<String>();
for (String s : list) {
if (!s.equals(str)) {
newList.add(s);
}
}
return newList;
}
public List<String> removeByIterator(List<String> list?? String str) {
Iterator<String> iterator = list.iterator();
while (iterator.hasNext()) {
String s = iterator.next();
if (s.equals(str)) {
// ?????????????????
iterator.remove();
}
}
return list;
}
|
??????????о????????????????????
???????????????????????漰???????????????????SPASVOС??(021-61079698-8054)?????????????????????????
??????
Java???????????Щ???????????????Java????????????????Java?б???Map????????Java Web???????????????Java??????????????д?????Java????????7???????????????????????(java .net ?????)???Java??????????Python??????Java webdriver??λ????????′????е?????Java??д??????????????????Java???????????????JavaScript????????????Java?????????????????? Java???????10??????????????Java?м????????????????java???????ü???????????м???????????????????
???·???
??????????????????
2023/3/23 14:23:39???д?ò??????????
2023/3/22 16:17:39????????????????????Щ??
2022/6/14 16:14:27??????????????????????????
2021/10/18 15:37:44???????????????
2021/9/17 15:19:29???·???????·
2021/9/14 15:42:25?????????????
2021/5/28 17:25:47??????APP??????????
2021/5/8 17:01:11????????
?????????App Bug???????????????????????Jmeter?????????QC??????APP????????????????app?????е????????jenkins+testng+ant+webdriver??????????????JMeter????HTTP???????Selenium 2.0 WebDriver ??????