58,454
社区成员
发帖
与我相关
我的任务
分享
public interface ComputeWeight {
public double computeWeight();
}
public class Television implements ComputeWeight{
double Tweight = 0.0;
public Television() {
// TODO Auto-generated constructor stub
}
public Television(double weight) {
// TODO Auto-generated constructor stub
Tweight = weight;
}
public double computeWeight() {
// TODO Auto-generated method stub
return Tweight;
}
}
this.addWindowListener(new WindowAdapter() {
public void windowClosing(WindowEvent e)
{
}
});
匿名内部类也可以不用?都没关系?