String Concatenation in Java


Hello Friends, Do you know how two add two strings?
For example you have two strings like 
String1 is "Software" 
String2 is "Testing"
How would you write "SoftwareTesting" as one single string?
Lets, see how we can do this in Java

Program for String Concatenation in Java


 Input
String String1 = "Software" String String2 = "Testing"

import java.lang.*;
public class DemoStringConcat {
    public static void main(String[] args) {
     
     String String1 = "Software";
     String  String2 = "Testing";
  
     // Concatenating and storing above Strings in another String
     String ConcatenatedString = String1 + String2 ;
  
     // Print the result
     System.out.println(ConcatenatedString );
   }
}

Output
"SoftwareTesting"
Will see some more programs in Java in the oncoming posts.