All challenges
Multiple ChoiceIntermediate 30s

Go: Embedding — Method Promotion

type MyStruct struct { OtherStruct } is:
Options
  1. 1Struct embedding (composition)
  2. 2Inheritance, via a parent class
  3. 3Interface implementation, via table
  4. 4Type aliasing, renaming the type

Think you can answer under pressure?

Get matched and answer live questions in 3-minute 1v1 battles. Elo ranking, badge tiers and bragging rights on the line.

Play this in a 3-minute battle