Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- fun main(args: Array<String>) {
- val a = Test()
- val b = Next()
- a.hello("山田")
- b.hello("鈴木")
- }//main
- open class Test(){
- fun hello(name : String){
- println("私は${name}です。HELLO!")
- }//hello
- }//Test
- class Next() : Test() //クラスの継承
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement