Sample Java program to concatenate two strings using plus (+) concatenation operator. public class StringConcatination { public static void main(String args[]) { String str1 = "Hello"; String str2 = "JavaTechig"; // Concatenation String str3 = str1.concat(str2); System.out.println("str1 = " + str1); System.out.println("str2 = " + str2); System.out.println("str3 = " + str3); String str4 = "Hello"; […]
↧