DEV Community

Discussion on: 50+ Core Java Interview Questions with Answers for Programmers

Collapse
 
kadiyakashyap profile image
Kashyap Kadiya

How many String objects are created in the code?

Two String objects are created there.
1) String pool and 2) Heap memory.