类类[B在Java中表示什么? [英] What does the class class [B represents in Java?

查看:5911
本文介绍了类类[B在Java中表示什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试一个工具jhat来测试我的java内存使用情况。它读入堆转储文件并以html格式输出信息。但是,表格显示如下:

I am trying out a tool jhat here to test my java memory usage. It reads in a heap dump file and prints out information as html. However, the tables shows as follows:

Class Instance Count Total Size 
class [B  36585  49323821  
class [Lcom.sun.mail.imap.IMAPMessage;  790  16254336  
class [C  124512  12832896  
class [I  23080  11923504  
class [Ljava.lang.Object;  13614  6664528  
class java.lang.String  108982  2179640  
class java.lang.Integer  219502  878008  

那些是什么[B [C等级?

What are those [B [C etc classes?

推荐答案

这些是基元数组( [B == byte [] [C == char [I == int )。 [Lx; 是类型 x 的数组。

Those are arrays of primitives ([B == byte[], [C == char, [I == int). [Lx; is an array of class type x.

如需完整清单:

[Z = boolean
[B = byte
[S = short
[I = int
[J = long
[F = float
[D = double
[C = char
[L = any non-primitives(Object)

另请参阅Javadoc Class.getName

Also see the Javadoc for Class.getName.

这篇关于类类[B在Java中表示什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆