是否可以在 java 中的 array
或 string
的末尾 append 单个字符。示例:
private static void /*methodName*/ () {
String character = "a"
String otherString = "helen";
//this is where i need help, i would like to make the otherString become
// helena, is there a way to do this?
}
最佳答案
1. String otherString = "helen" + character;
2. otherString += character;
关于java - 在java中将单个字符 append 到字符串或char数组?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14444717/