There are 3 types of garbage collection: Minor GC Major GC Full GC Minor GC: It’s also called as Scavenge GC. This is the GC which collects garbage from the Young Generation. Major GC: This GC collects garbage from the Old Generation Full GC: This GC collects garbage from all regions i.e. Young, Old, Perm, Metaspace. When Major or Full GC run all a...

Read More

There are 4 GC algorithms available in the Java Hotspot VM: The Serial GC – The serial collector uses a single thread to perform all garbage collection work. It is best-suited to single processor machines, because it cannot take advantage of multiprocessor hardware. It’s enabled with the option -XX:+UseSerialGC. The Parallel GC – The parallel colle...

Read More

Java class loaders are used to load classes at runtime. Class Loader in Java works on three principle: Delegation: Delegation principle forward request of class loading to parent class loader and only loads the class, if parent is not able to find or load class. Visibility : Visibility principle allows child class loader to see all the classes load...

Read More

An Object becomes eligible for Garbage collection or GC if it’s not reachable from any live threads or any static references in other words you can say that an object becomes eligible for garbage collection if it’s all references are null. Cyclic dependencies are not counted as reference so if Object X has reference of object Y and object Y has ref...

Read More

In the language like C,a programmer needs to manually do the memory management by allocating and de-allocating memory programmatically, but Java provides automatic memory management system,where a programmer does not worried about allocating/de-allocating memory at all ,but an utility which is an integral part of JVM does it for programmer automati...

Read More

From the uninitiated or the still in the learning phase of Java, the answer would definitely be that Java is "pass by reference". Rather than giving the answer we'll try to arrive at it. To start with let's assume Java is pass by reference like the much talked about predecessor C++. Let us try out the following code. It tries to update an ArrayList...

Read More

FOLLOW US ON LinkedIn



Explore Tutu'rself