This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
Abhishek KumarSoni wrote:According to me this function is not properly designed and output is useless outpur should be 456789 not [4,5,6,7,8,9].I could use this in parseInt function or everywhere a string object is required
The toString method for all array types outputs the contents in the same way - all the elements separated by commas and the whole thing enclosed by square brackets.
This is a good design because it produces consistent results for all array types and it is obvious the output was generated from a collection of some sort.
If you want the output in a different format then you need to write your own method.
subject: Arrays.toString() returns what kind of String