extends keyword in java

The ” extends ” keyword is used in a class or interface declaration to indicate that the class or interface being declared is a subclass of the class or interface whose name follows the extends keyword. In other words, When declaring a class/interface as a subclass of another class/interface, the extends keyword is used. Example […]

Share this article on

final keyword in java

The ” final ” keyword can be applied for variables,methods and classes. final variable: if a variable is marked as final, its reference can not be changed once initialized. Example: final int x=10; Now variable “x” is called final variable and its value 10 can not be changed further and doing so will give compile […]

Share this article on
< Previous Next >