Skip to content

Category Archives: Java

Java contains the functionality of initiating an external process – an executable file or an existing application on the system, such as Google Chrome or… Read More
Java.util.Locale Class in Java | Set 1 More methods:   getDisplayVariant() : java.util.Locale.getDisplayVariant() displays variant of the Locale Syntax :  public final String getDisplayVariant() Parameters : ---- Return… Read More
As the name suggests util.Locale Class is used to perform locale task and provides locale information for the user.  Declaration :  public final class Locale… Read More
Write a short program that prints each number from 1 to n on a new line.   For each multiple of 3, print “Multiple of 3”… Read More
Let us go through the basic pre-requisites such as Method Overloading, Autoboxing, and Unboxing. So method overloading in java is based on the number and… Read More
It is a priority queue based on priority heap. Elements in this class are in natural order or depends on the Constructor we used at… Read More
Java provides a feature to make the code more robust and to cut down the lines of code. This feature is known as Automatic Resource… Read More
What is a Constructor? Constructors are used to initialize the object’s state. Like methods, a constructor also contains collection of statements(i.e. instructions) that are executed… Read More
java.lang.Thread class provides the join() method which allows one thread to wait until another thread completes its execution. If t is a Thread object whose… Read More
Prerequisite – Equals and Hashcode method HashMap and HashSet use the hashcode value of an object to find out how the object would be stored… Read More
In object-oriented programming, a singleton class is a class that can have only one object (an instance of the class) at a time. After first time,… Read More
Thread can be referred to as a lightweight process. Thread uses fewer resources to create and exist in the process; thread shares process resources. The… Read More
Java.lang.object has two very important methods defined: public boolean equals(Object obj) and public int hashCode(). equals() method In java equals() method is used to compare… Read More
We often need to sort array while programming. For this, we use inbuilt method provided by Java in Arrays class i.e sort(). sort() method uses… Read More
Java.lang.Class class in Java | Set 1  More methods:  1. int getModifiers() : This method returns the Java language modifiers for this class or interface,… Read More

Start Your Coding Journey Now!