java:initializing_classes_and_constructors
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revision | Next revisionBoth sides next revision | ||
java:constructor_basics [2020/09/12 04:57] – mithat | java:constructor_basics [2020/09/12 04:58] – [Default constructors] mithat | ||
---|---|---|---|
Line 86: | Line 86: | ||
Note the syntax. A constructor: | Note the syntax. A constructor: | ||
- | * Does not have a return type (not even '' | + | * does not have a return type (not even '' |
- | * Has the same name as the class. | + | * has the same name as the class. |
- | * Is declared with '' | + | * is declared with '' |
Now when we instantiate a '' | Now when we instantiate a '' |
java/initializing_classes_and_constructors.txt · Last modified: 2020/09/16 18:15 by mithat