Posts from Java

Initializing a static Map using Stream in Java

By Niwedita Kumari

Before initializing a static map using Stream in Java, we need to know what is static. static is a non-access modifier in Java used as blocks, variables, methods and nested classes.... Read More

Serial sort vs Parallel sort in Java

By Caushik Subramaniam

A sort operation performed on an array can be either sequential or parallel. A sequential sort array can follow any sorting algorithm. There are many sequential sorting algorithms .... Read More

Java Program to merge two files in a third file

By Divya Junuthula

In this tutorial, we are going to learn how to merge two files using Java Program. To merge the two files into the third file firstly, we need to create two files namely f1 and f2..... Read More

Check if binary representation of a number is palindrome in Java

By Adit Gupta

In this tutorial, I will be explaining if the binary of a number is palindrome or not in Java. A palindrome number is one which when reversed, yields the same number with which we .... Read More

Difference between Inheritance and Composition in Java

By Aakash Puri

In this tutorial, you are going to learn about the difference between Inheritance and Composition and also how to use it in Java Programming language. Although both of the features.... Read More

Java ObjectInputStream skipBytes() Method

By Caushik Subramaniam

Object Serialization in Java is supported by the classes, ObjectInputStream and ObjectOutputStream. The Java class ObjectInputStream has a method called skipBytes(len) and it allow.... Read More

Turning off a particular bit in a number in Java

By Adit Gupta

In this tutorial, we will learn to turn off a bit of a number. We can use bitwise operators to carry out turning off a bit. However, if you wish to skip these operators you can man.... Read More

Java program to Detect Cycle in an Undirected Graph

By Sumanth

In this tutorial, you will learn how to detect if a cycle exists in an undirected graph in Java without using any complex cycle-detection algorithms. Detection of a cycle in an und.... Read More