ArrayList<String> list = new ArrayList<String>(); |
list.add( "one" ); |
int n = list.size(); |
for ( int i = n - 1 ; i >= 0 ; i--) |
{ |
if (list.get(i).equals( "one" )) |
{ |
list.remove(i); |
} |
} |
System.out.println(list); //源代码片段来自云代码http://yuncode.net |
|