article banner

Exercise: The closest supertype of types

What is the closest supertype of the following types?

  • Int and Double
  • Double and Number
  • String and Nothing
  • Float and Double?
  • String and Float
  • Char and Nothing?
  • Nothing and Any
  • Nothing? and Any
  • Char? and Nothing?
  • Nothing? and Any?

Once you are done with the exercise, you can check your solution here.