是否可以在Java中的arraystring的末尾附加一个字符。例:

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;

08-27 05:39