Category Archives

Archive of posts published in the category: JDK 1.7+ Tips

Splitting – Parsing a CSV String in Java

I found this to be very useful when I wanted to parse CSV strings into a Java List: Arrays.asList(someCsvString,split(“\\s*,\\s*”)); The nice part with this solution is the regex includes any spaces around the CSV.

Iterating through HashMaps

In my JDK 1.4 world, I had a very common way of iterating through lists and maps.  Switching to JDK 1.7 had me learning so many new ways of doing things in so many areas.  One of them was iterating over HashMaps, so…

Categories