Question: what is the difference between string literal and string object in java?
Answer: A String object is an individual instance of the java. lang. String class. ... This means, that the character sequence "abcde" will be stored at a central place, and whenever the same literal "abcde" is used again, the JVM will not create a new String object but use the reference of the cached String.