Skip to content

Instantly share code, notes, and snippets.

@rail-rate
Created October 1, 2019 13:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rail-rate/a6b2a48ece593d351688179374c9b49d to your computer and use it in GitHub Desktop.
Save rail-rate/a6b2a48ece593d351688179374c9b49d to your computer and use it in GitHub Desktop.
継承2
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() //クラスの継承
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment