how to use nested interface in java