java:this_operator

This is an old revision of the document!


A PCRE internal error occured. This might be caused by a faulty plugin

====== 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 =====

java/this_operator.1421862274.txt.gz · Last modified: 2016/02/26 11:15 (external edit)