Is there any function in java like toString() to print a String array?
This is a silly question but I want to know if there is any other way than writing a for loop.
Thanks.
Answer
String[] array = { "a", "b", "c" };
System.out.println(Arrays.toString(array));
No comments:
Post a Comment