This tutorial demonstrates how to convert a byte[] to String. Encoding this String into a sequence of bytes using the given Charset, storing the result into a new byte array. byte[] byteArray = “this...
In this example we obtain a list of month names as an array of String using DateFormatSymbols. List of Month Names with Locale The first method getMonths() returns the full name of the month....
In the following tutorial we demonstrate how to Display a list of countries using Locale.getISOCountries(). First we show how to obtain the country list in a pre defined language. The second example shows how...
In this tutorial we will show you how to load a file from the resources folder in Java. There are some cases in which you want to get a file from the resources folder, in...
Create the ZIP ZIP file generation in java is straight forward. You need a ZipOutputStream that takes a FileOutputStream witch takes the output name of the file. Using this with try with resources is...
Random numbers can be generated using the java.util.Random class or Math.random() static method. There is no need to reinvent the random integer generation when there is a useful API within the standard Java JDK....