What are the mechanics for class description (coding) in the JavaProgramming Language?

--Originally published at diegotc2016

Classes are defined by the following way:

class MyClass {
    // field, constructor, and 
    // method declarations
}

In the space that is between the braces you can give instrucitons, you can define objects or declarations that will make your code work. 

You can also get the name subclasses and superclasses. This can be represented in the next way: 

class MyClass extends MySuperClass implements YourInterface {
    // field, constructor, and
    // method declarations
}

The following means that MyClass is a subclass of MySuperClass and that it implements the YourInterface interface. 

You can also modify the classes from the beginning. Class declarations can include these components, in order:

  1. Modifiers such as public, private, and a number of others that you will encounter later.
  2. The class name, with the initial letter capitalized by convention.
  3. The name of the class’s parent (superclass), if any, preceded by the keyword extends. A class can only extend (subclass) one parent.
  4. A comma-separated list of interfaces implemented by the class, if any, preceded by the keyword implements. A class can implement more than one interface.
  5. The class body, surrounded by braces, {}.

I got this out of:

https://docs.oracle.com/javase/tutorial/java/javaOO/classdecl.html

and I received help from the teacher

What are the mechanics for class description (coding) in the JavaProgramming Language?


What are the mechanics for class description (coding) in the JavaProgramming Language?