Printing array elements with toString()

Arrays.toString() method makes it easier to print the elements of an array, forgetting the tedious iteration with for loops. Following is the method signature static String toString(int array1[]): Returns the array in string form useful to be displayed in a text field. This display the array elements comma-separated and placed within square brackets, "[]". Returns …

Printing array elements with toString() Read More »