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 */
|
} |
mPoint can have other methods to set its instance variables such as: |
public void setDelta(int _dx, int _dy) {
|
} |