Article
When working with Strings in Java, we oftentimes need to encode them to a specific charset, such as UTF-8. UTF-8 represents a variable-width character encoding that uses between one and four eight-bit bytes to represent all valid Unicode code points. A code point can represent single characters, but also have...
Branko Ilic
The InputStream class is a high-level class representing any input byte stream in Java. Various subclasses further specify its usage, such as the BufferedInputStream, ByteArrayInputStream, SequenceInputStream, etc. Needless to say, an InputStream can store any data and in some cases, they store String contents as a byte stream. In this...
David Landup
In Java, there is a distinct difference between null, empty, and blank Strings. An empty string is a String object with an assigned value, but its length is equal to zero. A null string has no value at all. A blank String contains only whitespaces, are is neither empty nor...
Selena Hocevar
In this article, we'll take a look at how to check if a String starts with another String in Java. This is is a fairly common task in programming, and is very similar to checking if a string contains a substring. For example, this can come in useful if we...
Strings are a handy way of getting information across and getting input from a user. In this article, we will go through a couple of ways check if a String is Numeric in Java - that is to say, if a String represents a numeric value. Check if String is...
Anđela Niketić
The Apache Commons library provides many new interfaces, implementations and classes that expand on the core Java Framework. It's one of the top third-party libraries and is present in many projects. In this article, we've compiled a Guide to Apache Commons' StringUtils class, which provides some very good utilities and...
This tutorial will go through some common techniques for removing elements from Java arrays. Manipulating array elements is an extremely common task as discussions about it can be found on many forums, particularly on StackOverflow. Here's a list of the techniques and methods we'll go over in this article: Using...
Luka Čupić
In this tutorial, we'll be diving into String Comparison in Java. String comparison is a common operation in all languages. The ability to check if one String is equal to another allows us to perform fundamental checks and alter the code flow. The == Operator The == operator is one of the...
© 2013-2024 Stack Abuse. All rights reserved.