Get Even More Visitors To Your Blog, Upgrade To A Business Listing >>

A Very Peculiar, but Possibly Cunning Kotlin Language Feature

This has caught me by surprise. After studying the Kotlin Language to learn about how to best leverage this interesting new language for jOOQ, I stumbled upon this puzzler. What do you think the following program will print? fun main(args: Array) { (1..5).forEach { if (it == 3) return print(it) } print("done") } Well… You ...



This post first appeared on Java Code Geeks, please read the originial post: here

Share the post

A Very Peculiar, but Possibly Cunning Kotlin Language Feature

×

Subscribe to Java Code Geeks

Get updates delivered right to your inbox!

Thank you for your subscription

×