<lambda>null1package demo 2 3 import p1.MyBinaryClass 4 5 /** 6 * This class supports greeting people by name. 7 * 8 * @property name The name of the person to be greeted. 9 */ 10 class Greeter(val name: String) { 11 12 /** 13 * Prints the greeting to the standard output. 14 */ 15 fun greet() { 16 println("Hello $name!") 17 } 18 } 19 mainnull20fun main(args: Array<String>) { 21 Greeter(args[0]).greet() 22 } 23 24 val str = "Hello! ".repeat(4) anull25val x: (a: String, b: Int) -> Int = { a, b -> 0 } 26 27 interface SomeInterface 28 private class SomeImpl : SomeInterface 29 SomeInterfacenull30fun SomeInterface.constructor(): SomeInterface { 31 return SomeImpl() 32 } 33 34 open class SomeType 35 class SomeSubType : SomeType() 36 SomeTypenull37fun SomeType.constructor(): SomeType { 38 return SomeSubType() 39 } 40 41 42 annotation class A(val p: String) 43 44 val MyBinaryClass.test get() = s() 45 46