- Data Structure
- Networking
- RDBMS
- Operating System
- Java
- MS Excel
- iOS
- HTML
- CSS
- Android
- Python
- C Programming
- C++
- C#
- MongoDB
- MySQL
- Javascript
- PHP
- Physics
- Chemistry
- Biology
- Mathematics
- English
- Economics
- Psychology
- Social Studies
- Fashion Studies
- Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
How to concatenate two strings using Java?
You can concatenate two Strings using the concat() method.
Example
public class ConcatinatedStrings { public static void main(String args[]) { String str1 = new String("Tutorials"); String str2 = new String( "Point"); String res = str1.concat(str2); System.out.println(res); } }
Output
TutorialsPoint
Advertisements