Posts from Java

Remove the Last Character from String in Java

By Shiksha Sinha

In this tutorial, we will learn to remove the last character from String in Java in different ways. Java Class Library(JCL) contains a class called String which is available under .... Read More

Initialize an array with same values in Java – Multiple ways

By Shiksha Sinha

In this tutorial, we will learn how to initialize an array with the same values in Java. An array, in Java, is an object of a similar data type that will contain data elements in a.... Read More

Convert char to int in Java

By Subhojeet Ghosh

In this tutorial, we will learn how can we change char to int in Java. There are many ways by which we can convert or change char to int. Some of the approaches are as follows: (1).... Read More

Java Math random() method

By Shiksha Sinha

In this tutorial, we will learn everything about Java Math random() method. Java includes various library methods. The library methods or functions are the in-built methods provide.... Read More

Create Immutable class in Java

By Shiksha Sinha

In this tutorial, we are going to learn how to create immutable classes in Java. Java provides us with a lot of advantageous features to make our tasks easier and more convenient t.... Read More

StringBuilder Class in Java

By Subhojeet Ghosh

In this tutorial, we will learn StringBuilder Class in Java and its application and methods used. String Builder Class in Java is used to create mutable String. As we know in Java .... Read More

Java stream forEach with index

By Shiksha Sinha

In this tutorial, we will learn about how to iterate over a Java stream with the index. We can do this in different ways, using Intstream, AtomicInteger. etc. Here we will learn it.... Read More

How to remove Special Characters from a String in Java

By Subhojeet Ghosh

In this tutorial, you will learn how to remove special characters from a String in Java. Let’s first define what a special character is. A special character is a character which .... Read More