Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
こんにちはList、Longデータ型をコンマ区切りに変換する必要があるという要件がありますString。どちらが適切な方法でしょう。私は文字列ビルダーを使用するか、それをに変換してから結合をList<String>使用して.StringUtilsString
List
Long
String
List<String>
StringUtils
またはjava 7を使用せずに解決策を探しています。guavajava 8
java 7
guava
java 8
これを試すことができます:
StringUtils.join(mylist, ',');
org.apache.commons.lang3.StringUtilsを参照してください。