Arrays class of java.util
package contains the method asList() which accepts the array as parameter.
So,
String[] wordArray = {"Love Yourself" , "Alive is Awesome" , "Be in present"};
List wordList = Arrays.asList(wordArray);
So,
String[] wordArray = {"Love Yourself" , "Alive is Awesome" , "Be in present"};
List wordList = Arrays.asList(wordArray);
No comments:
Post a Comment