Append a single character to a string or char array in java?

前端 未结 7 1046
轻奢々
轻奢々 2020-12-13 17:31

Is it possible to append a single character to the end of array or string in java

for example:

    private static void /*methodName*/ () {                


        
相关标签:
7条回答
  • 2020-12-13 18:03

    just add them like this :

            String character = "a";
            String otherString = "helen";
            otherString=otherString+character;
            System.out.println(otherString);
    
    0 讨论(0)
提交回复
热议问题