import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
public class Met {
public static void main(String[] args) {
People[] List = {
new Student(),
new Schoolboy()
};
java.util.List<People> Ary = new ArrayList<>();
Collections.addAll(Ary,List );
Arrays.sort(List, (People x1, People x2)-> (x1.id()? 0:1) - (x2.id()? 0:1));
for(int a=0;a<List.length;a++)
System.out.println(List[a]);
}
}
class Student implements People{
private boolean id=false;
public boolean id() {
return id;
}
}
class Schoolboy implements People{
private boolean id=true;
public boolean id() {
return id;
}
}
interface People {
boolean id();
}