Beginner Go (Golang)
Q36 / 100

What is composition over inheritance in Go?

Correct! Well done.

Incorrect.

The correct answer is B) Building complex types by embedding simpler structs and interfaces rather than using class inheritance

B

Correct Answer

Building complex types by embedding simpler structs and interfaces rather than using class inheritance

Explanation

Go has no class inheritance. Functionality is composed by embedding structs and satisfying interfaces, which encourages smaller, focused types.

Progress
36/100