How do you count the number of String objects created in a program in Java? What is the easiest way to identify it?

How do you count the number of String objects created in a program in Java? What is the easiest way to identify it?


First of all you need to understand that the String object is the special object in java. There are two types of memories which are used for Sting object. One is string pool and other is the main memory where object will be stored.

Upcoming answer of this question in details...

Comments

Popular posts from this blog

How do I create an array of a string?

Explain briefly about POJO in Java?