fun main() { val world = World(); world.print(100); world.print(101); world.print(102); println("==================="); val hello = Hello(); hello.print(200); println("==================="); val hello1 = HelloOne(); hello1.print(300); hello1.printone() println("==================="); val hello2 = HelloTwo(); hello2.print(400); hello2.printtwo(); println("==================="); } class World { external fun print(x:Int); fun play(){ println("play world"); println(this.state); }; val state:Int=200; companion object { init { System.loadLibrary("nama") } } } open class Hello { external fun print(x:Int); open fun play(){ println("play hello"); } companion object { init { System.loadLibrary("nama") } } } class HelloOne:Hello(),MyInterface { external fun printone(); override fun play(){ println("play hello one"); } override fun bar(){ println("hello one bar"); } } class HelloTwo:Hello(),MyInterface { external fun printtwo() override fun play(){ println("play hello two"); } override fun bar(){ println("hello two bar"); } } interface MyInterface { fun bar() }