Basic Java Language: Difference between revisions

wikademia>Cremisis13
wikademia>Remi0o
Line 2: Line 2:


=Touch on Classes=
=Touch on Classes=
Everything, in Java, is done inside classes. Essentially, in a brief talk, classes are bodies of statements, methods (you will learn these later), and variables. There is a method called main that all classes have. This is the start point of your program - where everything must begin. To create a class, the syntax (or basic outline in code) is:
Everything, in Java, is done inside classes. Essentially, classes are bodies of statements, methods, and variables. To whet your curiosity, a method usually consists of a sequence of statements to perform an action, a set of input parameters to customize those actions, and possibly an output value (called return value) of some kind. There is a method called main that all classes have. This is the start point of your program - where everything must begin. To create a class, the syntax (or basic outline in code) is:
<pre>
<pre>
[Protection] class [Name] [Extend/Implements...]
[Protection] class [Name] [Extend/Implements...]