Are all this Kotlin snippets equivalent?
open class A
// A() - explicit call of A default constructor
class B : A()
using super() :
open class A
class B : A {
constructor() : super()
}
using super :
open class A
class B : A {
constructor() : super
}
nothing is specified:
open class A
class B : A {
constructor()
}
So, what is a difference between super and super() in this cases, and if i understand right - last snippet implicitly calls super()?
What is a difference between super and super() in this cases
Nothing, both are the same
Last snippet implicity calls super()
Yes, it does.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With