Basics. last part 5. :)

A keyword is a reserved word in Java that has a specific meaning to the compiler. You cannot use the name of a keyword as a variable, method, or class.

Static => static is a modifier used to define a class-wide variable or method. It is a globally accessible field. A method marked static can only use other static variables or methods.

Final => The keyword final is used to specify a field or method as immutable. A variable marked final cannot be assigned a new value once initialized.

NOTE: A final reference variable can have properties that can value, but the reference itself cannot change.

Final methods => A method marked final cannot be overridden.

Final classes => A class marked final cannot be extended.

Abstract=> The keyword abstract declares a method or class as incomplete or as a template. An abstract method has no body. An abstract class cannot be instantiated and should be extended.

  • If you declare at least one method abstract, then the class must be declared as abstract
  • If you declare a class as abstract, you do not need to specify any methods as abstract
  • You cannot instantiate an abstract class

The keyword final can be applied to a class, method or variable. In all cases it means the structure cannot be changed, but what that actually means depends upon the construct that it is applied to.

When applied to a variable, it means that you cannot reassign the variable to another value. You must initialize a final variable when declaring it.

public final int x = 124;

When applied to a method, it means that you cannot override the method.

public final int someMethod(){ . . . }

When applied to a class, it means that you cannot create a subclass of this class.

public final class FinalClass { . . . }

A common example of a final class is the String class.

A class can declare both static and instance members.

Recall that a static member is shared class-wide while an instance member is associated with a single instance.

There are some resources for learning JAVA:

SOFTWARE ENGINEER — WEB DEVELOPER WITH HEART FOR FRONT-END, MINIMALISM AND RASMENTALISM.