我正在尝试将类点的对象创建到另一个类InterestPoint
中,有些单词我希望能够在INterestPoint
类中使用Points值但不使用遗传< / p>
public class InterestPoint {
private Point p1;
private String aeria;
public InterestPoint() {
this.p1 = new Point();
//p1.dysplay1();
}
}
修改
当你通过类功能调用我的方法打印我的观点时,你没有误解它给我打印的错误说:
Exception in thread "main" java.lang.UnsupportedOperationException: Not supported yet.
at Point.dysplay1(Point.java:29)
at InterestPoint.setall1(InterestPoint.java:22)
at Main.main(Main.java:16)
Java Result: 1
这就是我发布这个问题的原因:D
答案 0 :(得分:0)
回复:
Exception in thread "main" java.lang.UnsupportedOperationException: Not supported yet. at Point.dysplay1(Point.java:29) at InterestPoint.setall1(InterestPoint.java:22) at Main.main(Main.java:16) Java Result: 1
拍摄,你没有向我们展示你的整个InterestPoint课程,特别是你所拥有的方法必须看起来像:
public void setAll1() {
throw new UnsupportedOperationException("Not supported yet");
}
解决方案是摆脱抛出调用并输入有意义的代码。
public void setAll1() {
// get rid of this throw exception call
// throw new UnsupportedOperationException("Not supported yet");
// add some sensible code here
}