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 Get the Current Working Directory in JavaThis article introduces how to get the current working directory in Java. How to Get the File Extension of a File in JavaThis article introduces how to get the file extension of a file in Java. How to Call a Method in Another Class in JavaThis article introduces how to call a method in another class in Java. How to Generate a Random Number Between 1 and 10 in JavaCheck out the multiple ways we can generate random numbers between a range in Java. How to Print List in JavaThis article discusses how to print every single item of a list in Java with examples. How to Get User Input in JavaThis article explains the easiest ways to get user input in Java How to Remove a Character From String in JavaThis tutorial demonstrates how to remove a single character from string in Java How to Create a 2D ArrayList in JavaIt explains methods of how to create a two-dimensional ArrayList in Java How to Convert an ASCII Code to CharThis article shows methods of how to convert an ASCII Code to its equivalent character. How to Print an ArrayList in JavaIt demonstrates several ways on how to print an Arraylist in Java. How to Initialize an Empty Array in JavaThis tutorial demonstrates how to initialize an empty array and then assign values to it in Java How to Sort a String in JavaThis tutorial demonstrates how to sort a single string in Java How to Print an Array in JavaThis tutorial demonstrates how to print an array in Java How to Check if a File Exists in JavaThis tutorial goes through a few methods to check if a file exists in Java How to Get Input From the Console in JavaThis tutorial shows the various functions included in the Scanner class to read console input. How to Call a Variable From Another Method in JavaThis tutorial explains how to call a variable in another method in Java. How to Convert an InputStream Into a String in JavaThis article explains the ways to convert an InputStream to a String in Java using examples How to Create a Java for Loop With Two VariablesThis tutorial goes through the methods to use for loop with multiple variables How to Convert String to JSON Object in JavaThis tutorial explains how to convert a string into a json object in java How to Convert String to InputStream in JavaThis article dives into the various ways that we can use to convert a String to an InputStream in Java How to Convert String to DateTime Object in JavaThis tutorial explains how to convert a string into a DateTime object in Java How to Convert Hex String to Int in JavaIt shows three ways to convert a given hex string value to an int, long or BigInteger How to Multiply Strings in JavaThis article introduces methods to multiply strings in Java How to Iterate Through Set in JavaThis tutorial teaches how to iterate over a Set/HashSet without an iterator in Java