Latest Posts

Java @Override – Overriding in Java

Overriding is a very popular concept in programming languages. Method overriding in Java is the case where we have the same method present in the superclass as well as the subclass. It’s one of the….

Java String subSequence

Java 1.4 introduced the CharSequence interface and String implements this interface. This is the only reason for the implementation of subSequence() method in String class. Internally it invokes the substring() method. Java String subSequence Below….

Java String compareTo()

Java String compareTo() method is used to compare two strings lexicographically. This method is declared in Comparable interface. Since String implements Comparable interface, it provides compareTo() method implementation. Java String compareTo Java String class has….

Java Substring Method

Java String substring() Method Examples

Java String substring() method returns the substring of this string. This method always returns a new string and the original string remains unchanged because String is immutable in Java. Java String substring() Methods Java String….

Why String is Immutable in Java?

Why String is immutable in Java is one of the popular interview questions. The string is one of the most used classes in any programming language. We know that String is immutable and final in….

What is Java String Pool?

As the name suggests, String Pool in java is a pool of Strings stored in Java Heap Memory. We know that String is a special class in java and we can create String objects using….

String to char array java – convert string to char

Sometimes we have to convert String to the character array in java programs or convert a string to char from specific index. String to char Java String class has three methods related to char. Let’s….

Java String split

Java String split() method is used to split the string into a string array based on the provided regular expression. Java String split Sometimes we have to split String in Java, for example splitting data….

How to Sort a List in Java

Sometimes we have to sort a list in Java before processing its elements. In this tutorial, we will learn how to sort a list in the natural order. We will also learn how to use….

How to Sort an Array in Java

Java Array is like a container that can hold a fixed number of the same type of items, it can be primitive types as well as Objects. Array Sorting in Java Sometimes we need to….

Generic selectors
Exact matches only
Search in title
Search in content