The Java String concat() method concatenates one string to the end of another string.This method returns a string with the value of the string passed into the method, appended to the end of the string.
public String concat(String anostr)
anostr- string to be concatenated at the end of the another string.
combination of two strings is returned.
Example:To show working of concat() method
Gfg! is the best.
- Java Guava | Longs.concat() method with Examples
- Java Guava | Booleans.concat() method with Examples
- Java Guava | Shorts.concat() method with Examples
- Java Guava | Doubles.concat() method with Examples
- Java Guava | Chars.concat() method with Examples
- Java Guava | Bytes.concat() method with Examples
- Java Guava | Floats.concat() method with Examples
- DoubleStream concat() in Java
- IntStream concat() in Java
- Stream.concat() in Java
- LongStream concat() in Java
- Difference between concat() and + operator in Java
- Ints concat() function | Guava | Java
- Java String join() with examples
- Java String endsWith() with examples
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to email@example.com. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.
Improved By : Akanksha_Rai