Bookmark Topic Watch Topic
  • New Topic

How we can find that how much string objects has been created?

 
Hemant Khandal
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
  • Report post to moderator
Can any body tell me how much object has been created implicitly or explicitly?
Here is any way (method or anything) to find out created object?

public class stringClass {

public static void main(String args[]){
String name="Hemant";
String sName=name+"Khandal";
String s=sName+"Java";
String ss=new String("Hemant");
}

}
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64717
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Likes 1
  • Mark post as helpful
  • send pies
  • Report post to moderator
Please do not post the same question more than once.
 
    Bookmark Topic Watch Topic
  • New Topic