Created
August 7, 2018 20:54
-
-
Save ishaquehassan/53ab14850942471f0006538f562a3dcf to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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