How to concat or add two String in java example
public class Test {
public static void main(String[] args) {
String st = new String("Test String Here");
String st1 = new String("Second Test String Here");
String st2 = st.concat(st1);
System.out.println(st2);
}
}
public static void main(String[] args) {
String st = new String("Test String Here");
String st1 = new String("Second Test String Here");
String st2 = st.concat(st1);
System.out.println(st2);
}
}
Comments
Post a Comment