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

How to Compare Strings in JavaThis tutorial explains the different methods of comparing strings in java How to Generate Random String in JavaThis tutorial explains the methods to generate random alphanumeric strings in java. How to Return a Boolean Method in JavaThis tutorial explains how to return a boolean method in Java. How to Play Sound in JavaThis tutorial explains the methods of playing sound from audio files in java. How to Convert Int to Double in JavaThis tutorial explains the conversion of int variable to double in Java. How to Remove Duplicates From Array in JavaThis tutorial demonstrates how to remove duplicates from array in Java How to Remove Line Breaks Form a File in JavaThis tutorial shows how to remove line breaks from a file in Java with multiple approaches like replace, line separator, replaceAll. How to Convert Int to Char in JavaThis tutorial shows how to convert int to char in Java with methods like using ASCII values, character.forDigits, and Integer.toString. How to Compare Two Dates in JavaThis tutorial shows how to compare two dates in Java with multiple approaches like using before, after, equals and compareTo methods. How to Add One Day to a Date in JavaThis tutorial shows how to add one day to a Date in Java with several solutions like Calendar class, plus Days, Instant class. How to Convert Java String Into ByteThis tutorial shows how to convert Java string into byte with multiple approaches like using util.Arrays, getBytes and getBytes with specific encoding. How to Convert Byte Array in Hex String in JavaThis tutorial shows how to convert byte string with hex array in Java with multiple approaches like using Hex.encodeHexString(), DatatypeConverter() and append(.format). How to Concatenate Two Arrays in JavaThis tutorial shows how to concatenate two arrays in Java with multiple approaches like using ArrayUtil.addAll(), arraycopy() and incremental. How to Remove Substring From String in JavaThis tutorial shows how to remove substring from any given string in Java with multiple approaches like using replace(), replaceAll(), StringBuffer(), substring() and Apache Commons Lang Library. How to Sort Objects in ArrayList by Date in JavaThis tutorial shows how to sort objects in ArrayList by date in Java with multiple approaches like using; making object comparable<>, Collections.sort(), and list.sort(). The Push() Function in JavaThis tutorial demonstrates the push() function in Java. Regex Whitespace in JavaThis tutorial discusses about identifying the whitespaces using regular expressions in Java. Best Math Libraries Every Java Developer Should KnowIn this tutorial, we discuss the scope of various math libraries for Java. Then, we will show you how to configure the Apache Commons library in your development environment. Finally, we will show you some examples using Apache Commons. JavaFX Media PlayerThis article demonstrates the correct use of JavaFX media player to play media files using JavaFX. Array of Linked List in JavaThis article introduces an array of linked list in Java. The Char equals Method in JavaThis tutorial introduces how to check whether two chars are equal or not in Java. Class Field and Instance Field in JavaIn this article, you will learn some Java terms, class field and an instance field. Java Empty ConstructorThis tutorial demonstrates what is an empty constructor in Java. JavaFX setFill() MethodThis tutorial demonstrates how to use the setFill() method in JavaFX.