Skip to main content

Welcome to Geoff Hayward's Weblog

Commenting on Java, JavaFX, Java EE, Joomla, and IoT.

A colleague ask me how to convert an ArrayList to an Array in Java. Here was my answer:

List<String> results = new ArrayList<>();
...
results.toArray(new String[results.size()]);

Hope it's helpful. If you know of anymore ways to convert an ArrayList to an Array in Java, leave a comment.

Update: The Java 8 Lambda way: ArrayList to an Array



Read

Mailing List


Responsive Media

With the ResponsiveMedia plugin for Joomla it is easy to add 3rd party content from YouTube, Vimeo, and Instagram right in to any Joomla! article.

ResponsiveMedia