I'm trying to track down a memory leak in a java process, using jmap and jhat. Every time I do this I see those weird notation for specific object types, like [S
for string arrays and [C
for Character arrays. I never remember what means what, and it's very hard to google this stuff.
(EDIT: to prove my point, it turns out that [S
is array of short and [C
is array of char.)
Anyone care to make a table listing all the different class names and what they mean? Or point me to such table?
Specifically I'd like to know what [Ljava.lang.Object;
means.
You'll find the complete list documented under Class.getName():
The rules are listed in the API doc of Class.getName().
[Ljava.lang.Object;
would be an instance ofObject[]
. Note that multidimensional arrays are displayed with multiple opening braces.it is an array of objects as specified by JVM Specifications for internal representation of class names:
so [Ljava.lang.object; means Object[]
Means Object[]