class TestScope6 constructor() { var name: String = "saburo" var age: Int = 50 // Unit: 返し値 がないことを示す. fun introduce(name: String, age: Int): Unit { println("${this.name}、${this.age}歳です") } } fun main() { val testScope6: TestScope6 = TestScope6() testScope6.introduce("rokusuke", 60) }