Constructor | Method |
|---|---|
Initializes objects | Performs operations |
Same name as class | Any valid method name |
No return type | Can have a return type |
Called during object creation | Called explicitly |
Loading…
Constructor | Method |
|---|---|
Initializes objects | Performs operations |
Same name as class | Any valid method name |
No return type | Can have a return type |
Called during object creation | Called explicitly |