Java String Conversions

2021 VietMX 0

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 […]

Java 8 StringJoiner

2021 VietMX 0

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. […]

StringBuilder vs StringBuffer in Java

2021 VietMX 0

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 […]

Quick Guide to the Java StringTokenizer

2021 VietMX 0

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 […]

Guide to java.util.Formatter

2021 VietMX 0

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 […]

Concatenating Strings In Java

2021 VietMX 0

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 […]

CharSequence vs. String in Java

2021 VietMX 0

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 […]

Comparing Strings in Java

2021 VietMX 0

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 […]

Compact Strings in Java 9

2021 VietMX 0

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 […]

Split a String in Java

2021 VietMX 0

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 […]