Memory Allocation in Java

A typical Java process deals with the RAM, Non RAM memory and Registers. It’s useful to understand how a Java process accesses and manages these memories: Registers - the fastest storage in your computer are Registers. Why so ? Because Registers are present inside the processor itself. Registers cannot be accessed directly by a process. RAM - The memory allocated to a process resides in the RAM. There are two types of allocation that happens: Heap memory space - The general purpose pool of memory where all Java objects reside....

October 10, 2022 · 1 min · Ashish Gaur

Inheritance in Java

Inheritance is a mechanism through which a class can inherit properties(fields and methods) of another class. This allows to resuse the fields and methods of the parent class. Inheritance also represents the IS-A relationship which describes the parent-child relationships between the classes. Types of Inheritance Java allows 5 types of Inheritance: Single - One class inherits another class. class A { public void method() { // Do Something } } class B extends A { public void anotherMethod() { // Do Something } } Multilevel - A chain of inheritance....

October 10, 2022 · 2 min · Ashish Gaur