String Concat Example in java

In Java , we can concat strings in few ways. please have a look in to the below example how can achieve that.

Mainly 3 Ways we can concat strings in java, those are .

1. By using “+” operator

2. By Using concat() method.

3. By using StringBuffer’s append() method.

 

Example:

 OUT PUT:

 

Posted in string and tagged .

Leave a Reply

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