Skip to content
Free public beta until December 4, 2026: every course is open, no card needed. After that, the first chapter of each course stays free and full access is a one-time $39 ($19 for up to 100 founding members chosen for helpful feedback). Your progress is kept. How the beta works

default method

An interface method with a body, marked default, inherited by every implementing class.

A public instance method declared default in an interface; class methods beat it, a more specific interface's default beats it, and unrelated defaults must be resolved by an override (X.super.m()).

Examples

  • default String describe() { return "area " + area(); } inside an interface.

Read the full section →