java:defining_classes_in_java
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionNext revisionBoth sides next revision | ||
java:defining_classes_in_java [2020/09/12 02:04] – mithat | java:defining_classes_in_java [2020/09/12 02:51] – [Our first Java class] mithat | ||
---|---|---|---|
Line 28: | Line 28: | ||
Here's a Java definition for a '' | Here's a Java definition for a '' | ||
- | <file java ClickerCounter.java> | + | <code java> |
public class ClickerCounter { | public class ClickerCounter { | ||
| | ||
Line 41: | Line 41: | ||
} | } | ||
} | } | ||
- | </file> | + | </code> |
+ | |||
+ | This definition states that an instance of a ClickerCounter will consist of a '' | ||
+ | |||
+ | ==== Where does the definition go? ==== | ||
In Java, class definitions need to go in their own files, and the files need to be called the name of the class with the '' | In Java, class definitions need to go in their own files, and the files need to be called the name of the class with the '' |
java/defining_classes_in_java.txt · Last modified: 2020/09/14 01:38 by mithat