
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Difference Between String Object and String Literal in Java
When the String literal used to create String, JVM initially checks weather String with the same value in the String constant pool, if available it creates another reference to it else it creates a new object and stores it in the String constant pool.
In case of an object, each time you instantiate the class a new object is created given value irrespective of the contents of the String constant pool.
Advertisements