carlo
carlo

Reputation: 386

Interface and generics with Java

I have an interface defined in this way:

public interface GenericBo<T, PK extends Serializable> {

and another interface

public interface ServiceActivityBo<ServiceActivity, String> extends GenericBo<T, PK extends Serializable>

but I have an compilation error in the ServiceActivityBo when defined PK: Syntax error on token "extends", , expected

How should be defined the ServiceActivityBo ?

Upvotes: 0

Views: 37

Answers (1)

Petter
Petter

Reputation: 4165

Define it like this instead:

public interface ServiceActivityBo extends GenericBo<ServiceActivity, String> {

Upvotes: 5

Related Questions