|
|
|
|
Note the strange output for arrays. In the case of an array, the toString() method (and the getName() method) for Class returns a name like: [Ljava.lang.Double; Where the [ means "array of" and the remaining character(s) are chosen from the following table (see the Java Language Specification), with the specified meaning.
For example, the following piece of code:
returns:
This strange encoding is used in a number of places in Java, notably in Reflection and also in JNI (Java Native Interface) when interfacing with code written in other languages (notably C and C++).
|
| The page was last updated February 19, 2008 |