Top Posts in Python
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 special class in java and we can create String object using new….
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….
Comparable and Comparator in Java Example
Comparable and Comparator in Java are very useful for sorting the collection of objects. Java provides some inbuilt methods to sort primitive types array or Wrapper classes array or list. Here we will first learn….
How to Convert String to Array in Java
Sometimes we have to split String to array based on delimiters or some regular expression. For example, reading a CSV file line and parsing them to get all the data to a String array. In….
Java String Array to String
Today we will look into how to convert Java String array to String. Sometimes we have to convert String array to String for specific requirements. For example; we want to log the array contents or….