To convert array based data into list / collection based we can use java.util.Arrays class. This class provide a static method asList(Object[] a) that converts array into list / collection.
|
The result of our code is:
Happy
New
Year
2006
|
To convert array based data into list / collection based we can use java.util.Arrays class. This class provide a static method asList(Object[] a) that converts array into list / collection.
|
The result of our code is:
Happy
New
Year
2006
No comments:
Post a Comment