How to Center Text Output in Java

Learn multiple ways to center text output in Java: String formatting, StringBuilder, and StringUtils from the Apache Commons Lang libraries.

Extracting a Tar File in Java

In this tutorial, we explore Java libraries for extracting tar archives: Apache Commons Compression, Apache Ant, and Apache VFS. The article provides concise code snippets and highlights the key features of each approach. Read on to learn efficient ways of extracting tar archives in Java.

Adding One Month to Current Date in Java

In this short tutorial, we discuss various methods of adding one month to the current date in Java. We cover using core Java methods as well as popular external libraries such as Joda-Time and Apache Commons Lang3.

Lossy and Lossless Image Compression Using Java

Learn how to compress images in Java using built-in libraries and Apache Commons Imaging. Image compression reduces file size without compromising visual quality. It optimizes image-heavy applications and websites for faster loading and better user experience.

Java PrintStream to String

This article provides several ways of converting a PrintStream to a String in Java.The approaches include using ByteArrayOutputStream, a custom output stream, and Apache Commons IO.