Declaration of class

class declaration of the form:

{Modifiers}  class {class name } {
{Body Class}

{Modifiers} class is a Java key words such as: public, private, abstract or final; {name class} is any identifier that meets certain criteria, and the {body class} This class variable declarations and methods of this class.

The class name is a combination of several words capitalized example. MyFirstClass. There will be a syntax error calling class in other ways, eg. MyFirstClass (ie. With a small letter), but this is clearly contrary to the recommendations, and we should not ever do. Java is case sensitive, so the name MyFirstClass is something completely different than myFirstClass. This applies to all identifiers, not just class names. The name of the class, we can also use the outside of the letters and characters $ _. We can also use digits, but not at the beginning of the name pop over to this web-site. The correct name so it will My1stClass but 1stClass not.



Cookies help us deliver our services. By using our services, you agree to our use of cookies. More Info | Close