Practical solutions

Java Howtos How-To Guides

Solve the problem. Keep building. Collection of Java how-to articles

Find the answer you need

Browse practical solutions, grouped by the task you're working on.

__COUNT__ entries on this page

5 Best Image Processing Libraries in JavaThis tutorial demonstrates the 5 best image processing libraries in Java. How to Convert Enum to Int in JavaThis tutorial demonstrates how to convert Enum to Int in Java. How to Use Index With forEach in JavaThis tutorial will discuss how to use the index with forEach in Java. How to Use Multiple Values for One Switch Case Statement in JavaIn this article, we will learn to use multiple values for one switch case statement. How to Convert Milliseconds to Minutes and Seconds in JavaIn this article, we will learn how to convert milliseconds to seconds and minutes in Java. Inheritance on an Enum in JavaDiscover challenges and techniques in enum inheritance, learning to overcome limitations for code organization. How to Add New Elements to an Array in Javadiscuss how to add new elements to an array in Java. Since arrays are fixed size, the possible solution is to use an arraylist or create a new array, copy all the elements from previous array, and then add a new element How to Initialize an Array in JavaIt explains the declaration and the two most common ways to initialize an array in Java How to Split a String in Javadiscuss how to split a string in Java based on a given parameter How to Check Whether an Array Is Null/Empty in JavaIt demonstrates how to check null or an empty array in Java How to Create a New List in JavaThe article introduces methods to create a new list in Java How to Check if a String Is a Number in JavaThis article introduces how to check whether a string is numeric or not in Java. How to Read a File to a String in JavaTake a look at the several methods by which we can read and convert the file content into a Java string How to Convert String to Double in JavaThis article introduces various methods to convert a string to a double value and handling the NumberFormatException How to Check Whether a String Contains a Substring in JavaThis article introduces how to check whether a string contains a substring in Java. How to Join Two Lists in JavaDifferent methods could be used to join two lists in Java without changing the original lists, like stream, Parameterized Constructor, Predeclared List and addAll() method. How to Remove Whitespace From String in JavaThis article introduces how to remove whitespace from string in Java. How to Iterate Over Each Element of Map in JavaThis article introduces how to iterate map elements in Java. How to Create a File and Write Data to It in JavaThe article introduces methods to create a file and write data to it in Java How to Read a Large Text File Line by Line in JavaThe article introduces methods to read a large text file line by line efficiently in Java How to Convert Hashmap to JSON Object in JavaThis article introduces the methods which allow us to convert a hashmap to a simple JSON object How to Get the Separate Digits of an Int Number in JavaIt explains all the methods to separate every single digit of an integer number with examples How to Remove Punctuation From String in JavaThis article introduces how to remove punctuation from string in Java. How to Pass a Function as a Parameter in JavaThe article introduces methods to pass a function as an argument/parameter to another function in Java