Object Cloning is a process of generating the exact field-to-field copy of object with the different name. The cloned object has its own space in the memory where it copies the content of the original object.
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.
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
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
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.