import java.util.*;
public class Test {
public static void main(String[] args) {
System.out.println(Person.count);
//Person p = new Person();
//p.toString();
//p.setAge(20);
Person[] people = new Person[4];
Student S = new Student("张三","男",19,"002");
S.toString();
S.work();
SuperMan S1 = new SuperMan("张三","男",19,"002");
S1.toString();
S1.work();
people[0]=S;
people[1]=S1;
people[2] = new Student("里斯","男",19,"002");
people[3] = new SuperMan("超人","男",19,"自带");
Scanner scan= new Scanner(System.in);
int age=scan.nextInt();
Person p = new Person() {
public void work() {
}
};
try{
p.setAge(age);
}catch(lllegaException e)
{
System.out.println(e.getMessage());
e.printStackTrace();
}
for(int i=0; i<people.length; i++)
{
people[i].toString();
if(people[i] instanceof SuperMan)
((SuperMan)people[i]).Fly();
}
LinkedList<String> list = new LinkedList<>();
for(int i=0; i<5; i++)
{
list.add(i,scan.next());
}
for(int i=0; i<list.size(); i++)
{
System.out.println(list.get(i));
}
System.out.println();
for (String x:list)
{
System.out.print(x+" ");
}
Iterator<String> it = list.iterator();
while(it.hasNext())
{
System.out.println(it.next());
}
ArrayList<Integer> list2 = new ArrayList<>();
for(int i=0; i<10; i++)
{
list2.add(i,scan.nextInt());
}
Iterator<Integer> it2 = list2.iterator();
while(it2.hasNext())
{
int x=it2.next();
if(x>5) it2.remove();
else System.out.print(x+" ");
}
Set<Integer> ha = new HashSet<Integer>();
for(int i=0; i<10; i++)
{
ha.add(scan.nextInt());
}
System.out.println(ha);
}
}