1 | Methods of identical name to class are special -- they are constructors |
2 |
mPoint() { /* Default Constructor */
|
3 | } |
4 | We can overload method to define different versions with different numbers and types of arguments |
5 |
mPoint(int _x, int _y) { /* Constructor to set Specific Initial values */
|
6 | } |
7 | mPoint can have other methods to set its instance variables such as: |
8 |
public void setDelta(int _dx, int _dy) {
|
9 | } |