User Tools

Site Tools


java:initializing_classes_and_constructors

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revisionBoth sides next revision
java:constructor_basics [2020/09/12 04:57] mithatjava: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 ''void''). +  * does not have a return type (not even ''void''). 
-  * Has the same name as the class. +  * has the same name as the class. 
-  * Is declared with ''public'' access.+  * is declared with ''public'' access.
  
 Now when we instantiate a ''ClickerCounter'': Now when we instantiate a ''ClickerCounter'':
java/initializing_classes_and_constructors.txt · Last modified: 2020/09/16 18:15 by mithat

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki