Name-based Typing
← Back to Structural vs Nominal Typing
Types are compatible only if they are explicitly declared as related by name (through inheritance or interface implementation). Two types with identical structures are still incompatible if not nominally related. Java and C# use nominal typing, providing stronger encapsulation.