This is the mail archive of the
java-patches@gcc.gnu.org
mailing list for the Java project.
Re: [gui] Boolean and formatting fix
Jerry Quinn wrote:
> Michael Koch wrote:
>
>
>
> The getConstructor call doesn't have any comments about mapping Boolean.class
> to boolean args, so I used boolean.class. However, when calling newInstance,
> you do have to wrap a boolean in a Boolean. The sun docs never really talk
> about how ambiguity between boolean and Boolean are called.
>
Use Boolean.class when you pass Boolean. Use Boolean.TYPE for boolean.
Presumably Boolean.TYPE == boolean.class.
I was unaware that boolean.class was even valid syntax. You learn
something new every day.
David Daney