This is an old revision of the document!
====== Oι τελεστές this και super ====== ===== Ο τελεστής this ===== Ας υποθέσουμε τον παρακάτω τμήμα κώδικα το οποίο συναντήσαμε προηγούμενα <code java> public class Rectangle { private int width, height; private Point origin; public Rectangle(Point p, int w, int h) { origin = p; width = w; height = h; } ... } </code> Εναλλακτικά, το παραπάνω μπορεί να γραφεί ως εξής. <code java> public class Rectangle { private int width, height; private Point origin; public Rectangle(Point origin, int width, int height) { origin = this.origin; width = this.width; height = this.height; } ... } </code> ===== Ο τελεστής super =====