Skip to content

Category Archives: Java

Java provides built-in support for multithreaded programming. A multi-threaded program contains two or more parts that can run concurrently. Each part of such a program… Read More
Given a string, remove all the leading and trailing spaces from the string and return it. Examples: Input : str = " Hello World "… Read More
Many websites use small strings of text known as cookies to store persistent client-side state between connections. Cookies are passed from server to client and… Read More
The switch statement is a multi-way branch statement. It provides an easy way to dispatch execution to different parts of code based on the value… Read More
The switch statement is a multi-way branch statement. In simple words, the Java switch statement executes one statement from multiple conditions. It is like an… Read More
Singleton is a part of Gang of Four design pattern and it is categorized under creational design patterns. In this article, we are going to… Read More
Daemon thread in Java is a low-priority thread that runs in the background to perform tasks such as garbage collection. Daemon thread in Java is… Read More
isHidden() method of File class in Java can use be used to check if a file is hidden or not. This method returns a boolean… Read More
CyclicBarrier is used to make threads wait for each other. It is used when different threads process a part of computation and when all threads… Read More
Often, when transferring files from the camera folder to a workspace where we would like to analyze the pictures, it becomes difficult to deal with… Read More
This article discusses different ways to reverse a string in Java with examples. Examples:     Recommended: Please try your approach on {IDE} first, before moving on… Read More
Authenticator class is used in those cases where an authentication is required to visit some URL. Once it is known that authentication is required, it… Read More
Prerequisite – JAR file format Whenever a developer wants to distribute a version of his software, then all he want is to distribute a single… Read More
Prerequisite – Collections in Java 1) What is the output of the following program?  Java import java.util.*;   public class priorityQueue {     public static void… Read More
Java doesn’t have pointers; Java has references. Reference: A reference is a variable that refers to something else and can be used as an alias… Read More

Start Your Coding Journey Now!