The basic syntax in Java
About Java programing you should keep in mind the following points.
All Java components are required names. Names for classes, variables and methods are called identifiers.
In Java, there are several points to keep in mind about identifier. They are as follows:
All identifiers can be alphabet letters (A,a –Z,z), Dollar sign $, an Underscore _
After the first character of the identifier may have any combination of characters.
Reserved Keywords (in Java) are not allowed to use as identifiers.
The most important is the identifier is case sensitive.
Examples of legal identifiers: a, $dollar, _age,
Examples of illegal identifiers: 123, -age, 007bond
Like other languages, it is possible to modify the classes, methods, etc., by using a modifier.
There are two types of modifiers:
Access modifiers: default, public, protected, private
Non-access modifiers: final, abstract
We'll see the following types of variables in Java:
About modifiers and variables, there is detail discussion in the coming next section.