Hi Frndz, 1.Its is possible to check how many string objects in string pool and see these object through any example programe. 2. Also i want to check how many string objects create out of string pool or any memory location. waiting youre reply... thanx Aftab Abbasi
If you are writing the application, each time you create a string, just add 1 to a static variable counter. If you are asking to inventory the java heap - not a clue.
"JavaRanch, where the deer and the Certified play" - David O'Meara
I doubt you can do that from java code directly. intern() in String is a native method, which means this pool is somewhere on the VM implementation level. Possibly, you can get this info using some sort of -Xprof option supplied to the java executable or use some sort of Java profiler like JProbe. They use native Java profiling interface to get all that data. You can also write some native code to get that info. -VG.