
Check If a String Is Numeric in Java
1. Introduction Oftentimes while operating upon Strings, we need to figure out whether a String is a valid number or not. In this tutorial, we’ll explore multiple ways to […]
1. Introduction Oftentimes while operating upon Strings, we need to figure out whether a String is a valid number or not. In this tutorial, we’ll explore multiple ways to […]
1. Overview In this quick article, we’re going to do some simple conversions between the Hex and ASCII formats. In a typical use case, the […]
1. Introduction In this quick article, we’ll have a look at how to convert a List of elements to a String. This might be useful in certain scenarios […]
1. Overview Java 8 introduced the Stream API, with functional-like operations for processing sequences. If you want to read more about it, have a look at this article. […]
1. Introduction When dealing with exceptions in Java, we’re frequently logging or simply displaying stack traces. However, sometimes, we don’t want just to print the […]
1. Introduction In this short article, we will see how to convert a String into an enum in Java quickly. 2. Setup We are dealing […]
1. Overview In this quick article, we’ll explore some simple conversions of String objects to different data types supported in Java. 2. Converting String to int or Integer If we need to […]
1. Introduction StringJoiner is a new class added in Java 8 under java.util package. Simply put, it can be used for joining Strings making use of a delimiter, prefix, and suffix. […]
1. Overview In this short article, we’re going to look at similarities and differences between StringBuilder and StringBuffer in Java. Simply put, StringBuilder was introduced in Java 1.5 as a replacement […]
1. Overview In this quick article, we’ll explore a fundamental class in Java – the StringTokenizer. 2. StringTokenizer The StringTokenizer class helps us split Strings into multiple tokens. StreamTokenizer provides similar functionality […]
1. Overview In this article, we’ll discuss the String formatting in Java using the java.util.Formatter class, which provides support for the layout justification and alignment. 2. How to Use […]
1. Introduction Java String is one of the most important classes and we’ve already covered a lot of its aspects in our String-related series of tutorials. In this […]
1. Introduction Java provides a substantial number of methods and classes dedicated to concatenating Strings. In this tutorial, we’ll dive into several of them as well as outline […]
1. Overview In this tutorial, we’ll discuss the basics of character encoding and how we handle it in Java. 2. Importance of Character Encoding We […]
1. Overview String formatting and generating text output often comes up during programming. In many cases, there is a need to add a new line […]
1. Introduction Simply put, CharSequence and String are two different fundamental concepts in Java. In this quick article, we’re going to have a look at the differences between these […]
1. Overview In this article, we’ll talk about the different ways of comparing Strings in Java. As String is one of the most used data types in Java, this […]
1. Overview Strings in Java are internally represented by a char[] containing the characters of the String. And, every char is made up of 2 bytes because Java internally uses UTF-16. For […]
1. Introduction Splitting Strings is a very frequent operation; this quick tutorial is focused on some of the API we can use to do this simply in […]
1. Introduction In this article, we’re going to see how we can check whether a given String is a palindrome using Java. A palindrome is a word, […]