Which type in Scala is a subtype of all types?

18. Which type in Scala is a subtype of all types -

  1. Int
  2. Ref
  3. Boolean
  4. Nothing

Answer: D) Nothing

Explanation:

In Scala, Nothing is treated as the subtype of all types.

Comments and Discussions!

Load comments ↻






Copyright © 2024 www.includehelp.com. All rights reserved.