Try something like List<String> myList = new ArrayList<String>(Arrays.asList(s.split(","))); Demo: String s = "lorem,ipsum,dolor,sit,amet"; List<String> myList = new ArrayList<String>(Arrays.asList(s.split(","))); System.out.println(myList); // prints...
  • April 3, 2022
  • 0 Comments