Language&FrameWorks/Java14 STS - Automatic updates download' has .... An error occurred while collecting items to be installedsession context was:(profile=DefaultProfile, phase=org.eclipse.equinox.internal.p2.engine.phases.Collect, operand=, action=).No repository found containing: osgi.bundle,org.eclipse.m2e.archetype.common,1.6.1.20150625-2337No repository found containing: osgi.bundle,org.eclipse.m2e.core,1.6.1.20150625-2338No repository found containing: osgi... 2015. 9. 2. 이클립스에서 클래스에서 인터페이스로 추출하기 Extract Interface.. 클래스들을 인터페이스를 목적으로 쉽게 추출할 수 있다. 2011. 5. 20. Java Clone 테스트 package ch09; class Point implements Cloneable { // Cloneable인터페이스를 구현한 클래스에서만 clone()을 호출할 수 있다. 이 인터페이스를 구현하지 않고 clone()을 호출하면 예외가 발생한다. int x; int y; Point(int x, int y) { this.x = x; this.y = y; } public String toString() { return "x="+x +", y="+y; } public Point clone() { Object obj=null; try { obj = super.clone(); } catch(CloneNotSupportedException e) {} // clone메서드에는 CloneNotSupportedExce.. 2011. 5. 8. 도형(원,직사각형)의 넓이의 합을 구하는 문제 package ch07.ex14; abstract class Shape { Point p; Shape() { this(new Point(0,0)); } Shape(Point p) { this.p = p; } abstract double calcArea(); // 도형의 면적을 계산해서 반환하는 메서드 Point getPosition() { return p; } void setPosition(Point p) { this.p = p; } } class Point { int x; int y; Point() { this(0,0); } Point(int x, int y) { this.x=x; this.y=y; } public String toString() { return "["+x+","+y+"]"; } dou.. 2011. 5. 7. 이전 1 2 3 4 다음