Skip to content

Category Archives: Java

Import statement in Java is helpful to take a class or all classes visible for a program specified under a package, with the help of… Read More
Java source file structure describes that the Java source code file must follow a schema or structure. In this article, we will see some of… Read More
FileInputStream class is helpful to read data from a file in the form of a sequence of bytes. FileInputStream is meant for reading streams of… Read More
FileInputStream class is quite helpful to read data from a file in the form of a sequence of bytes. FileInputStream is meant for reading streams… Read More
Modifiers are specific keywords present in Java using that we can make changes to the characteristics of a variable, method, or class and limit its… Read More
The available() method of FileInputStream class is used to return the estimated number of remaining bytes that can be read from the input stream without… Read More
Packages in Java are a mechanism to encapsulate a group of classes, interfaces, and sub-packages. In Java, it is used for making search/locating and usage… Read More
Given a large positive number as string, count all rotations of the given number which are divisible by 4.  Examples:  Input: 8 Output: 1 Input:… Read More
Given an unsorted array of integers, sort the array into a wave like array. An array ‘arr[0..n-1]’ is sorted in wave form if arr[0] >=… Read More
java.net.FileNameMap is a Java Interface. FileNameMap interface is a part of the java.net package. FileNameMap provides a mechanism to map between a file name and… Read More
The module is a collection of packages designed for reuse, and Module JAR is a regular JAR with a module descriptor in its root folder.… Read More
Given an array arr[] of n integers, find the maximum that maximizes the sum of the value of i*arr[i] where i varies from 0 to… Read More
Given an array of integers, evaluate queries of the form LCM(l, r). There might be many queries, hence evaluate the queries efficiently.   LCM (l, r)… Read More
Given an array of distinct elements. The task is to find triplets in the array whose sum is zero. Examples :  Input : arr[] =… Read More
In a Java program, operations can be performed on methods, constructors, and initialization blocks. Instance Initialization Blocks or IIB are used to initialize instance variables.… Read More

Start Your Coding Journey Now!