Java String concat Example
String class concat method example
String class concat method example. This example shows you how to use concat method.This method Concatenates the specified string to the end of this string.
Here is the Code:-
/**
* @(#) Concatenatestring.java
* Program Shows a class representing the Concatination of the 2 String
* @Version 01-May-2008
* @author Rose India Team
*/
class Concatenatestring
{
public static void main(String[] args)
{
// Declaration of String 1
String a="Welcome to";
// Declaration of String 2
String b=" Rose India";
// Concatenates the specified string to the end of this string.
String c= a.concat(b);
//Displays the Concatination of String a & b
System.out.println("THE CONCANATED STRING IS="+c);
}
} |
null
|