Help the world stop coronavirus! Stay home!

Prev Next

Java / Strings

Where are the string created with the toString() method in memory?

It is based on jvm implementation per object. Usually toString method creates object in heap.

Integer.toString() method creates in heap but not for all toString() methods. Boolean.toString(), for example, returns strings from the string pool.

❤Cash Back At Stores you Love !!!❤

Earn your $10 reward when you make your first purchase through Ebates by signing up with clicking below button.

Ebates Coupons and Cash Back

More Related questions...

Show more question and Answers...

Using String

Comments & Discussions