Array to String and String to array

Converting array to string

toString

he simplest way to convert an Array to String is by using the java.util.Arrays class. It has already a built in method toString().

Output:

Converting String into array

split()

split method takes string as input and return string array.

Output:

Help others by sharing the content!

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.