Skip to content

Category Archives: Java

instanceof is a keyword that is used for checking if a reference variable is containing a given type of object reference or not. Following is… Read More
In C++ we have all class member methods as non-virtual. In order to make so, we have to use a keyword as a prefix known… Read More
The class Date represents a specific instant in time, with millisecond precision. The Date class of java.util package implements Serializable, Cloneable and Comparable interface. It… Read More
We generally counter with such conversion articles because many operations can be performed over a string while we are limited to when it comes to… Read More
The java.lang.System.exit() method exits current program by terminating running Java virtual machine. This method takes a status code. A non-zero value of status code is… Read More
In computing, the producer-consumer problem (also known as the bounded-buffer problem) is a classic example of a multi-process synchronization problem. The problem describes two processes,… Read More
The Queue interface is present in java.util package and extends the Collection interface is used to hold the elements about to be processed in FIFO(First… Read More
Prerequisite: Multithreading in Java, Synchronized in Java  Inter-thread communication in Java is a mechanism in which a thread is paused running in its critical section… Read More
Consider the following Java program. import*; class GFG {     public static void main (String[] args)     {         int x = 012;         System.out.print(x);     } } Output:… Read More
The Arrays class in java.util package is a part of the Java Collection Framework. This class provides static methods to dynamically create and access Java… Read More
Object cloning refers to the creation of an exact copy of an object. It creates a new instance of the class of the current object… Read More
Scope of a variable is the part of the program where the variable is accessible. Like C/C++, in Java, all identifiers are lexically (or statically)… Read More
Java supports the creation and manipulation of arrays as a data structure. The index of an array is an integer value that has value in… Read More
Note:java.rmi package: Remote Method Invocation (RMI) has been deprecated in Java 9 and later versions, in favor of other remote communication mechanisms like web services… Read More
A final variable in Java can be assigned a value only once, we can assign a value either in declaration or later. final int i… Read More

Start Your Coding Journey Now!