Convert long[] array to String[] array using Apache Commons

This Java code example shows how to convert an array of long values to an array of String values using the Apache Commons Beanutils library.

The Apache Commons Beanutils library comes with a bunch of converters to convert to and from different data types. It also has a convenient utility class called ConvertUtils that make use of these converters so you don’t have to use them directly. The ConvertUtils class converts String arrays to arrays of a specified Class (or the other way around). The code below shows how to use this class to convert a long array[] to a String[] array.

The output from the code above is:

Search for more Java info on this site here:
Custom Search

Any thoughts or questions?