A class should always have a constructor. The constructor initiates the data members.
The keyword this references to current class data members.
Structure of a class:
Hint: Always pass values in the main method (via constructor).
Class default modifier = internal (= accessible from other classes).
Instantiating an object:
Dog dog = new Dog();
- dog = reference variable, it references to the heap where the object is created
- new Dog() = new object
- tanny = only reference, NOT the object
No object is created here in the second example.