import java.util.*;
class Test{
public static void main(String[] args){
LinkedList l=new LinkedList();
String[] s={"john","millter","johnson","hutter","willams","weak"};
System.out.println ("检索LinkedList中的对象");
System.out.println ("++++++++++++++++++++++++++++");
for (int i=0; i<6; i++) {
l.add(s[i]);//这是做什么的?
}
for (int i=0; i<l.size(); i++) {
System.out.println (l.get(i));//这里
}
System.out.println ("搜索对象从LinkedList");
for (int i=0; i<l.size(); i++) {
if((((String)l.get(i)).startsWith("j"))){
System.out.println (l.get(i));//这里
}
}
}
}