Concatenating String in Java


/ Published in: Java

Concatenating String in Java


Copy this code and paste it in your HTML
  1. public class ConcatenateString{
  2. public static void main(String args[]){
  3. String str1, str2;
  4. str1 = "I am learning ";
  5. str2 = "Java programming language";
  6. str1 = str1 + str2;
  7. System.out.println(str1);
  8. }
  9. }

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.