- Trending Categories
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
Java string concat() method vs "+" operator
The notable differences between concat() method and +operator are:
concat() method | +operator |
---|---|
You cannot concat a null value to a String using the concat() method. | You can concat null value using the ‘+’ operator. |
Using the concat() method you can concat only two String variables. | Using the ‘+’ operator you can concat multiple values. |
Using the concat() method you can concat only String type of arguments. | Using the ‘+’ operator you can concat any type of arguments. |
Advertisements