aspose file tools*
The moose likes Java in General and the fly likes type parameter extends 2 interfaces Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Java in General
Bookmark "type parameter extends 2 interfaces" Watch "type parameter extends 2 interfaces" New topic
Author

type parameter extends 2 interfaces

Henrique Ordine
Ranch Hand

Joined: Sep 03, 2004
Posts: 127
I`d like to declare a type param which extends two interfaces. Is that possible?
I tried <T extend IA, IB> but the compiler thinks IB is another type parameter.

Any help will be really appreciated.


J2EE Architect/Developer
Rob Spoor
Sheriff

Joined: Oct 27, 2005
Posts: 19760
    
  20

Use &:


SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6
How To Ask Questions How To Answer Questions
Henrique Ordine
Ranch Hand

Joined: Sep 03, 2004
Posts: 127
cool, thanks again rob.
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 39832
    
  28
Surely it's "extends" not "extend"?
Rob Spoor
Sheriff

Joined: Oct 27, 2005
Posts: 19760
    
  20

Surely it is. I guess I copied Henrique's typo.
 
wood burning stoves
 
subject: type parameter extends 2 interfaces