Есть такой код:
public class Rectangle {
public int left;
public int top;
public int width;
public int height;
public void initialize(int left, int top, int width, int height) {
...
}
public void initialize(int left, int top) {
...
}
public void initialize(int left, int top, int width) {
...
}
public void initialize(Rectangle rectangle) {
this.left = rectangle.left;
this.top = rectangle.top;
this.width = rectangle.width;
this.height = rectangle.height;
}
public static void main(String[] args) {
}
}
Верно ли, что в части кода ниже мы инициализируем переменные экземпляра класса Rectangle его же значениями, которые по умолчанию "0"? Т.е. верно ли, что по обеим сторонам оператора "=" обращение к одной и той же переменной?
public void initialize(Rectangle rectangle) {
this.left = rectangle.left;
this.top = rectangle.top;
this.width = rectangle.width;
this.height = rectangle.height;
}