Given a Collection of Strings, how would you join them in plain Java, without using an external Library?
Given these variables:
Collection
Different intentions:
For third-part tools, such as Guava's Joiner, which is not fast, but very flexible. There are many option methods to customize join behavior, such as skipNulls().
Joiner
skipNulls()
Plain Java is fast, but it needs you write some lines of codes by yourself.