Java interface code