Simple String Concatenation Example in JAVA

By | June 25, 2011

Hi,

Given below is a simple concatenation example in JAVA where two strings are joined together to form a single string.

public class MainClass {
 
  public static void main(String[] arg) {
 
    String yourString = "Coderz" + "Heaven";
 
    System.out.println(yourString);
 
  }
 
}

And…the output will be.. “CoderzHeaven”

🙂

Leave a Reply

Your email address will not be published. Required fields are marked *