Showing posts with label Modifier. Show all posts
Showing posts with label Modifier. Show all posts

Saturday, October 27, 2018

abstract and final

As an abstract method has no implementation, and a final method has the 'final' implementation, a method cannot be marked both abstract and final.

Monday, March 19, 2012

The Static keyword

The static keyword is a Java modifier which associates a class member or method with a class rather than an instance of a class.

For instance, the main method of a class is always static as there must be exactly one instance of the class containing main in order for the compiler to find it.

A class containing static members or methods does not require instantiation in order to use the static methods of the class.