The this keyword usage has a reason that field gets shadowed by constructor parameter or method. For example the Point class is as following written: Java Code: public class Point { public int x = 0; public int y = 0; //constructor public Point(int a, int b) { x = a; y = b; } } However, other way to write it is; Java Code: public class Point { ...
public class Point { public int x = 0; public int y = 0; //constructor public Point(int a, int b) { x = a; y = b; } }
public class Point {
Size Reduced for Images in PDF &...
05-15-2013, 05:53 PM in Java Software