January 2018
Intermediate to advanced
434 pages
14h 1m
English
Delegated properties are one of the best features of Kotlin language. We have already seen observable and vetoable delegates. In this recipe, we will learn how to create our own custom delegate. As a demo example, we will create a delegate property that can only be initialized once; if done again, it should throw an exception. So let's dive into it and see how we can achieve it.
Read now
Unlock full access