Created
November 15, 2020 12:07
-
-
Save arifvn/f3a286a8c4d0f2da6c082599017714bd to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
fun nonInline(callback: () -> Unit) { | |
println("before callback") | |
callback() | |
println("after callback") | |
} | |
// in java code | |
public void nonInline(Function callback) { | |
System.out.println("before callback"); | |
callback.invoke(); | |
System.out.println("after callback"); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment