Java - Modifier

Java Conceptuel Diagram


A modifiers affect runtime behaviour of class or method

  • Access modifiers: public, protected, and private
  • Modifier requiring override: abstract
  • Modifier restricting to one instance: static
  • Modifier prohibiting value modification: final
  • Modifier forcing strict floating point behaviour: strictfp

Not all modifiers are allowed on all classes, for example an interface cannot be final and an enum cannot be abstract.

java.lang.reflect.Modifier contains declarations for all possible modifiers.

Discover More
Java Conceptuel Diagram
Java - (Method|Functions)

A function that belong to an object is called a methods. A static method is then a sort of function. Methods: operate on an object's internal state and serve as the primary mechanism for object-to-object...
Java Conceptuel Diagram
Java - Abstract Modifier

Abstract is a modifier that require override. An abstract class is a class that can't be instantiated. It's only purpose to be extended by other classes. See enum Abstract class provides a skeletal...
Java Conceptuel Diagram
Java - Final Modifier

Final is modifier prohibiting value modification. Declaring an entire class final prevents the class from being subclassed. This is particularly useful, for example, when creating an immutable...
Java Conceptuel Diagram
What is the Java Main Method and how to create one ?

This page is the main method in Java (ie the startup point of every app). This is a quick example that shows how to write a main method. psvmtab In the Java programming language, every application...

Share this page:
Follow us:
Task Runner