Check if a variable type is Object[] and only Object[]!
PatchaFeb 21 2012 — edited Feb 22 2012Hi all!
Maybe this is a newbee question... but a similar situation never happened to me before!
I have a method which accept an Object[] parameter.
But the particularity of the method is that I need to check if the type of the given parameter is actualy Object[] only !!!
As to say that any other kind of array have to return false after a check... like String[], Number[] or whatever...
For what I know "*instanceof Object[]*" always return true 'cause all classed inheredit from Object (except on array of primitives, which actually can't be passed as argument here).
So how I can get false if the type of the given array parameter is not exactly "*Object[]*"?