Abstract class in Java

A class that is declared with an abstract keyword is known as Abstract Class. It is used to achieve a certain level of abstraction. An abstract class provides partial abstraction, whereas an interface provides full abstraction.

Understanding Interface in Java

An interface is considered as the core part of Java Programming Language. An interface is similar to a class, but is NOT a class. We can say an interface to be a blueprint of a class with just the static constants and abstract methods. If you are not aware of an abstract method, it is

Initialization block in Java

Just as constructors and methods, initialization blocks also add up to places where an operation can be performed. So there are few rules to keep in mind when dealing with the initialization blocks. But before we do that, we must know that there are two types of initialization block in Java, namely – Static initialization block Instance

Variable shadowing in Java

If there exists two variables with the same name in a particular scope, one of the variables take the priority while the other one gets hidden or shadowed. This is also known as Variable Shadowing in Java. In the following snippet, we can find the same thing happening.

Understanding instanceof operator in Java

instanceof operator in java is used to compare object reference variables. It can be used to check if the object referenced by any object reference variable is of a particular type. This is also known as the type comparison operator. The instanceof operator evaluates to return either a true or false.
Receive our updates to your inbox