Tag Archives: regex

Split comma-separated Strings in Java

Shortly, I saw some code like this to work with comma separated lists: The code uses String.split(“,”) to split the strings at commas and String.trim() to remove unwanted whitespaces. But theres’s a much more elegant way to do that in … Continue reading

Posted in Java Basics | Tagged , , , , , | 5 Comments