Category Java

Garbage Collection in Java

Garbage Collection in Java

Garbage collection in Java is the process of automatically freeing heap memory by deleting unused objects that are no longer accessible in the program. In other simple words, the process of automatic reclamation of runtime unused memory is known as…

Custom Annotation in Java

Creating your own annotation is called custom annotation or user-defined annotation in Java. It is very easy and more interesting to create your own annotation than using core java or third-party annotations. A custom annotation is declared by using the…

Annotations in Java

An annotation in Java is a kind of note (or documentation) in the application source code to instruct the Java compiler to do something. When the Java compiler sees annotation in a particular source code, it knows that it needs…

Sorting Array in Java

Methods for sorting array in Java

Sorting an array in Java means arranging elements of an array in a specific order, either in ascending or descending order. Sorting, like searching, is the most common task in computer programming. It is the process of arranging a list…