Complete the code to create a Runnable using SAM conversion.
val runnable = Runnable { println([1]) }
runnable.run()Complete the code to create a Comparator using SAM conversion that compares integers.
val comparator = Comparator<Int> { a, b -> a [1] b }
println(comparator.compare(5, 3))Fix the error in the SAM conversion for ActionListener.
val listener = ActionListener { e -> println(e.[1]) }Fill both blanks to create a Thread using SAM conversion and start it.
val thread = Thread([1]) thread.[2]()
Fill all three blanks to create a Timer with delay 1000, an ActionListener using SAM conversion, and start the timer.
val timer = Timer([1], [2]) timer.[3]()
