QamoosTech
Programming FundamentalsIntermediate

Interface

PronunciationIN-ter-fays

Definition

A contract that lists what methods or properties something must provide, without saying how they work.

Where you hear it

TypeScript, Java, and discussions about writing code that is easy to swap and test.

Examples

  • Both payment providers implement the same PaymentGateway interface.
  • Code against the interface, not the implementation.

Common mistake

Confusing it with UI. In programming, "interface" often has nothing to do with screens.