The Artima Developer Community
Sponsored Link

Legacy Java Answers Forum
April 2000

Advertisement

Advertisement

This page contains an archived post to the Java Answers Forum made prior to February 25, 2002. If you wish to participate in discussions, please visit the new Artima Forums.

Message:

Profiling

Posted by Shriram Shivakumar on April 25, 2000 at 4:50 PM

Well. You could use any Java Profiling tool to find out how many objects of a particular type are created. A simple solution is to use the Sun's profiler, which comes with the JDK.


> Hi Bill,

> Is there any way that we can find out how many objects have been
> created in runtime?

> In the following condition,
> String s1 = "Hello world";
> Stirng s2 = new String("Hello world");
> How many objects have been created??
> Since they have the same hashcode, does it mean that they are
> the same object??

> Thank you

> Jane






Replies:

Sponsored Links



Google
  Web Artima.com   
Copyright © 1996-2009 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use - Advertise with Us