aspose file tools*
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes Generics - wildcard with multiple bounds Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Soft Skills this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "Generics - wildcard with multiple bounds" Watch "Generics - wildcard with multiple bounds" New topic
Author

Generics - wildcard with multiple bounds

Adrian Sosialuk
Ranch Hand

Joined: Jun 07, 2007
Posts: 57
Hello everyone,

I'm new here and I would like to ask two questions:

1) Is there any special forum for java's generics questions ?

2) Why it is not allowed for a wildcard to have more then one bound, like:
?

Thanks a lot !

Adrian
Chandra Bhatt
Ranch Hand

Joined: Feb 28, 2007
Posts: 1707
Hi Adrian,
Welcome to JavaRanch!

You can use type parameter instead of wild card. Multiple bounds are allowed
with type parameter. There are two kinds of bounds lower bounds and upper
bounds with wildcards, whereas there is no such thing as lower bound in the
type parameter.


Thanks,


cmbhatt
Adrian Sosialuk
Ranch Hand

Joined: Jun 07, 2007
Posts: 57
Hi Chandra !

Thanks for quick reply.

Yes - I know that I can use type parameters instead.
I just wanted to know why Sun decided not to allow to
have multiple bounds on wildcards. There is a good explanation
about why there isn't a lower bound on type parameters
in Angelika Langers FAQ, so I was hoping to get a similar
explanation

Thanks,

Adrian
John Stone
Ranch Hand

Joined: May 04, 2007
Posts: 332
take a look here:
http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=5052951
Adrian Sosialuk
Ranch Hand

Joined: Jun 07, 2007
Posts: 57
Oh yeah ...

That at least says there could be some usefulness of it
I assume, that it had to meet some bigger difficulties in
implementation process. I still wonder what they were ...


Thanks a lot anyway !

Adrian
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Generics - wildcard with multiple bounds