Created
August 19, 2019 14:10
-
-
Save donchan922/49f6a4b19ef17e64afb500c9fff7f759 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
StringBuilder stringBuilder = new StringBuilder(); | |
String[] names = {"Alice", "Bob", "Carol"}; | |
for (String name : names) { | |
stringBuilder.append(name); | |
stringBuilder.append(","); | |
} | |
// Alice,Bob,Carol, <- 末尾の,が邪魔 | |
System.out.println(stringBuilder.toString()); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment