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.
Attention reader! Don’t stop learning now. Get hold of all the important Java and Collections concepts with the Fundamentals of Java and Java Collections Course at a student-friendly price and become industry ready.
- Java Guava | Booleans.concat() method with Examples
- Java Guava | Shorts.concat() method with Examples
- Java Guava | Bytes.concat() method with Examples
- Java Guava | Chars.concat() method with Examples
- Java Guava | Floats.concat() method with Examples
- Java Guava | Doubles.concat() method with Examples
- Java Guava | Longs.concat() method with Examples
- Stream.concat() in Java
- IntStream concat() in Java
- DoubleStream concat() in Java
- LongStream concat() in Java
- Ints concat() function | Guava | Java
- Difference between concat() and + operator in Java
- Split() String method in Java with examples
- Java String endsWith() with examples
- Java String format() with examples
- Java String getChars() with examples
- Java String join() with examples
- Java String toLowerCase() with examples
- Java String subSequence() method 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 firstname.lastname@example.org. 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