What's a quick way to output the values in an array?
Author: Deron Eriksson
Description: This Java tutorial describes the use of ArrayUtils to output the values in an array.
Tutorial created using: Windows XP || JDK 1.5.0_09 || Eclipse Web Tools Platform 1.5.1

Page: < 1 2

(Continued from page 1)

Execution of ArrayTest is shown below.

Execution of ArrayTest

ArrayUtils.toString() is a great way to display the values of simple data types. For more complex data types, like JavaBeansW, you can use ArrayUtils.toString() in conjunction with ToStringBuilder.reflectionToString() in the toString() method of your complex data type to display the values of your objects in your array.

Page: < 1 2