The Object Class In Java
Every class in Java is descended from the java.lang.Object class. If no inheritance is specified when a class is defined, the superclass of the class is Object by default. For…
Every class in Java is descended from the java.lang.Object class. If no inheritance is specified when a class is defined, the superclass of the class is Object by default. For…
Aggregation is a special form of association that represents an ownership relationship between two objects. Aggregation models has-a relationships. The owner object is called an aggregating object, and its class…
Polymorphism is the ability of an object to take on many forms. The most common use of polymorphism in OOP occurs when a parent class reference is used to refer…
Types of Java Garbage Collectors In this tutorial, we will go through the various type of Java garbage collectors available. Garbage collection is an automatic process in Java which relieves…
The Garbage Collection events cleaning out different parts inside heap memory are often called Minor, Major, and Full GC events. In this section, we cover the differences between these events.…
Now that you understand why the heap is separted into different generations, it is time to look at how exactly these spaces interact. The pictures that follow walks through the…
Automatic garbage collection is the process of looking at heap memory, identifying which objects are in use and which are not, and deleting the unused objects. An in use object,…
A class that is declared using “abstract” keyword is known as abstract class. It can have abstract methods(methods without body) as well as concrete methods (regular methods with body). A…
What is an interface in Java? Interface looks like a class but it is not a class. An interface can have methods and variables just like the class but the…
The keyword super refers to the superclass and can be used to invoke the superclass’s methods and constructors. A subclass inherits accessible data fields and methods from its superclass. Does…