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.
Don’t stop now and take your learning to the next level. Learn all the important concepts of Data Structures and Algorithms with the help of the most trusted course: DSA Self Paced. Become industry ready at a student-friendly price.
- Java Guava | Shorts.concat() method with Examples
- Java Guava | Longs.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 | Bytes.concat() method with Examples
- Java Guava | Booleans.concat() method with Examples
- LongStream concat() in Java
- Stream.concat() in Java
- DoubleStream concat() in Java
- IntStream concat() in Java
- Difference between concat() and + operator in Java
- Ints concat() function | Guava | Java
- Java String toLowerCase() with examples
- Java String format() with examples
- Java String getChars() with examples
- Java String endsWith() with examples
- Java String join() with examples
- How to Convert a String value to Float value in Java with Examples
- String toString() Method in java 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