You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
19 lines
417 B
Java
19 lines
417 B
Java
import com.google.common.collect.Lists;
|
|
|
|
import java.util.List;
|
|
|
|
public class TestMain {
|
|
public static void main(String[] args) {
|
|
List<String> list = Lists.newArrayList();
|
|
list.add("11");
|
|
list.add("22");
|
|
list.add("11");
|
|
for (String str : list){
|
|
if ("22".equals(str)){
|
|
return;
|
|
}
|
|
System.out.println(str);
|
|
}
|
|
}
|
|
}
|