📄 element.java
字号:
/* * Element.java * * Created on 2006年4月17日, 下午2:15 * * To change this template, choose Tools | Options and locate the template under * the Source Creation and Management node. Right-click the template and choose * Open. You can then make changes to the template in the Source Editor. */package test;import java.lang.*;/** * * @author michael */ public class Element implements Comparable{ int id; double d; public Element(int idd,double dd){ id=idd; d=dd; } public int compareTo(Object x){ double xd=((Element)x).d; if (d<xd) return -1; if (d==xd) return 0; return 1; } public boolean equals(Object x){ return d==((Element)x).d; } }
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -