You can use the below statements:
Code Snippet:
String [] arr = {"Sharlock", "Homes", "Watson"};List<String> names = Arrays.asList(arr);
You can use the below statements:
String [] arr = {"Sharlock", "Homes", "Watson"};List<String> names = Arrays.asList(arr);