|
Java™ by example!
|
|
|
What is a type descriptor?
It is a unique string that represents the class. For reference types, you can find out the type descriptor of a class by calling getClass on an instance and getName. Primitive types have "hard-coded" type descriptors according to the following table:
The type descriptor of an array is [ for each dimension. So an array of int[][] will have a type descriptor [[I. Main.java:
outputs:
Further Information
Author of answer: Joris Van den Bogaert
Comments to this answer are only viewable by members. Login or become a member!
|
|
|
|
|