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 *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code class="" title="" data-url=""> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre class="" title="" data-url=""> <span class="" title="" data-url="">