Core java Archive

Segment Tree in java

In this post, we will see about Segment Tree in java. Problem Consider an Array of Integers, int arr = {a1, a2, a3, a4, a5,….., an}; Given two types of queries, (i) In the first …

Java add to array

In this post, we will see how to add elements to the array. Using Apache’s common lang library You can use varargs add method to add elements to array dynamically. Here are the few add …

Java FileReader Example

The FileReader class of java.io package provides a seamless and easy-to-use way to read and analyse the contents of a file using Java. The FileReader class, works similar to the FileInputStream class because it reads …

Java Collection to List

In this post, we will see how to convert Java Collection to List. There are many ways to do it, we will see two ways here. Using ArrayList constructor Above ArrayList‘s constructor creates a …

Join Our News Letter - Stay Updated

Subscribe to Awesome Java Content.
You can like our facebook page Java2blog