Methods of identical name to class are special -- they are constructors |
mPoint() { /* Default Constructor */
|
} |
We can overload method to define different versions with different numbers and types of arguments |
mPoint(int x, int y) { /* Constructor to set Specific Initial values */
|
} |
Note this refers to current object |
mPoint can have other methods to set its instance variables such as: |
public void setDelta(int _dx, int _dy) {
|
} /* where we don't need this as used _dx, _dy */ |