How to get array's class

Hi, I have an Byte[] array, how to get its class, because I need to use JTable.setDefaultRenderer(class,renderer) method.Thank you for help!Janet
[173 byte] By [kfsong] at [2007-9-26 1:15:20]
# 1
Why cannot you use byte[] b =new byte[10];System.out.println(b);?
valjok at 2007-6-29 0:41:37 > top of Java-index,Archived Forums,Swing...
# 2
Yes, I did try, but the class shown is "[B", this is strange and cannot be used as a parameter for the setDefaultTableRenderer().Janet
kfsong at 2007-6-29 0:41:37 > top of Java-index,Archived Forums,Swing...
# 3
I've tried it's working:JTable table = new JTable();table.setDefaultRenderer((new byte[10]).getClass(), new javax.swing.table.DefaultTableCellRenderer());
valjok at 2007-6-29 0:41:37 > top of Java-index,Archived Forums,Swing...
# 4
Thank you very much, valjok. Now it's working!Janet
kfsong at 2007-6-29 0:41:37 > top of Java-index,Archived Forums,Swing...