Retrieving array class name

Viewed 11067

I have I problem.

In a method I receive a general Object as parameter and I have to retrieve the name of the class

public void myMethod(Object o)
  String className = o.getClass().getName();
  ...
}

It works, except when i give to the methods arrays. For example if a pass to the method an array of double (double[]), getClass().getName() returns me [D

How can I retrieve something like double[]?

3 Answers
Related