Alpha Payments interview question

Why interface are used in java