I was writing some code and was going to throw a RuntimeException
as a default for something, when I noticed that there are two options for RuntimeException
- one from java.lang
and one from kotlin
:
Inside the kotlin version of this, there's an entire list of other methods which work the same way :
So, from my understanding of this, the one from package kotlin
is simply an alias for the java equivalent (correct me if I'm wrong) which leads me to the question :
what is the point of having this alias file and when should you use it over the "standard" java equivalent ? Does this simply save a few imports ?