Quantcast
Channel: Java – StackTips
Viewing all articles
Browse latest Browse all 50

String Concatenation Test in Java

$
0
0
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"; […]

Viewing all articles
Browse latest Browse all 50

Trending Articles