In Scala, Nothing is a Type (final class). It is defined at the bottom of the Scala Type System that means it is a subtype of anything in Scala. There are no instances of Nothing.
Use Cases of Nothing In Scala:-
If Nothing does not have any instances, then when do we use this one in Scala Applications?
1.Nil is defined using Nothing.
2.None is defined using Nothing.
Nil is an object, which is used to represent an empty list. It is defined in “scala.collection.immutable” package as shown below:
object Nil extends List[Nothing]
and here is example for 1,Nil is defined using Nothing
scala> Nil
res5: scala.collection.immutable.Nil.type = List()
scala> Nil.length
res6: Int = 0