User Tools

Site Tools


java:defining_classes_in_java

Differences

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

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Last revisionBoth sides next revision
java:defining_classes_in_java [2020/09/12 03:25] mithatjava:defining_classes_in_java [2020/09/12 03:32] – [Instantiation and use] mithat
Line 49: Line 49:
 In actuality, this is a pretty crappy class definition for reasons we'll see later. But for now it's enough to get us started. In actuality, this is a pretty crappy class definition for reasons we'll see later. But for now it's enough to get us started.
  
-==== Instantiation and use ====++==== Instantiation and use ====+
  
 The above is just a class definition. It doesn't actually make any objects you can use. The code below shows you how to make, or **instantiate** a ''ClickerCounter'' object and then call the object's methods to change the state of the object.  The above is just a class definition. It doesn't actually make any objects you can use. The code below shows you how to make, or **instantiate** a ''ClickerCounter'' object and then call the object's methods to change the state of the object. 
Line 74: Line 74:
 public class ClickerCounter { public class ClickerCounter {
  
-    // Class definition+    // Class definition (instance members)
     int count;     int count;
          
java/defining_classes_in_java.txt · Last modified: 2020/09/14 01:38 by mithat

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki