咋那么回事,该如何处理

咋那么回事
package src;
import java.util.*;

public class X implements Comparable<X>{
String name;
int id;
public X(String name,int id){
this.name=name;
this.id=id;
}
public void setId(int id){
this.id=id;

}
public void setName(String name){
this.name=name;
}
public int  getId(){
return this.id;
}
public String getName(){
return this.name;
}
public int compareTo(X o) {
int i=this.id>o.id?1:(this.id==o.id?0:-1);
return i;
}


public static void main(String[] args) {
TreeSet<X> tree=new TreeSet<X>();
X x1=new X("E",5);
X x2=new X("D",4);
X x3=new X("C",3);
X x4=new X("B",2);
X x5=new X("A",1);
//X x6=new X("A",1);
tree.add(x1);
tree.add(x2);
tree.add(x3);
tree.add(x4);
tree.add(x5);
//tree.add(x6);
Iterator it=tree.iterator();

while(it.hasNext()){
X x=(X)it.next();
System.out.println(x.getId()+":"+x.getName());
}

it=tree.headSet(x2).iterator();
System.out.println("---------");
while(it.hasNext()){
X x=(X)it.next();
System.out.println(x.getId()+":"+x.getName());
}
it=tree.subSet(x4,x2).iterator();
System.out.println("---------");
while(it.hasNext()){
X x=(X)it.next();
System.out.println(x.getId()+":"+x.getName());
}
it=tree.tailSet(x3).iterator();
System.out.println("---------");
while(it.hasNext()){
X x=(X)it.next();
System.out.println(x.getId()+":"+x.getName());
}
}


}

------解决方案--------------------
LZ想表达什么?我运行了一下代码,能够出结果,你是对结果不明白?你对结果的哪些方面不明白?你也需要在问题中进行详细的描述,这样方便大家给你解答。
------解决方案--------------------
问题呢??描述清楚点