Skip to content

Instantly share code, notes, and snippets.

@ishaquehassan
Created August 7, 2018 20:54
Show Gist options
  • Save ishaquehassan/53ab14850942471f0006538f562a3dcf to your computer and use it in GitHub Desktop.
Save ishaquehassan/53ab14850942471f0006538f562a3dcf to your computer and use it in GitHub Desktop.
fun MyClass.hello(){
}
fun main(args: Array<String>) {
val myObj = MyClass("Ishaq",10,"34343434")
myObj.phone
myObj.hello()
val a:Compulsury = B("",0)
}
open class MyClass(var name:String? = null,var age:Int = 0){
var phone:String = ""
constructor(name:String,age:Int,phone:String) : this(name,age){
this.phone = phone
println("MyClass hello")
}
init {
println("hello")
}
fun helloABC(name:String){
}
}
interface Compulsury{
fun A()
fun B()
}
interface Compulsury1{
fun C()
fun D()
}
class B(a:String,b:Int) : MyClass(a,b), Compulsury,Compulsury1{
override fun C() {
}
override fun D() {
}
override fun A() {
}
override fun B() {
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment