Re: Get Class object for array
- From: "Mike Schilling" <mscottschilling@xxxxxxxxxxx>
- Date: Thu, 03 May 2007 19:33:16 GMT
"Andreas Wollschlaeger" <postmaster@xxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:f1dceg$55n$1@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Mike Schilling wrote:
For a call to Class.getMethod(), I need the Class instance that
represents Class[]. Obviously, I can do
(new Class[0]).getClass()
but is there anything neater?
To my surprise,
Class[].class
works.... gee, and i thought i *know* Java ;-)
So it does :-)
I tried (Class[]).class which doesn't.
Thanks.
.
- References:
- Get Class object for array
- From: Mike Schilling
- Re: Get Class object for array
- From: Andreas Wollschlaeger
- Get Class object for array
- Prev by Date: Re: Get Class object for array
- Next by Date: Re: Web scrapping
- Previous by thread: Re: Get Class object for array
- Index(es):