how to add a string in java code example
Example 1: add one character to string java
char ch='A';
String str="pple";
str= ch+str; // str will change to "Apple"
Example 2: java concatenate strings
public class Concat {
String cat(String a, String b) {
a += b;
return a;
}
}