THE IDEA
Understand the concept
A class can define fields for state and methods for behavior. A constructor runs when new creates an instance, giving the object a useful initial state before other methods use it.
WORKED EXAMPLE

LESSON 06 ยท JAVA
Objects combine state and behavior; constructors initialize new instances.
THE IDEA
A class can define fields for state and methods for behavior. A constructor runs when new creates an instance, giving the object a useful initial state before other methods use it.
WORKED EXAMPLE