תכנות מתקדם ב-Java/עבודה לפי ממשק: הבדלים בין גרסאות בדף
תוכן שנמחק תוכן שנוסף
שורה 40:
public class Blackbox {
private int
public int getField() {
return
}
public void setField(int val) {
}
}
שורה 55:
public class ClosedObject {
private Blackbox
public ClosedObject() {
}
public Blackbox getBox() {
return
}
public void printBox() {
System.out.println("What is in the box? "+
}
}
שורה 83:
public Blackbox getBox() {
Blackbox temp = new Blackbox();
temp.setField(
return temp;
}
|