Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

What is this "get0" syntax in Kotlin

Confused this "get()" usage. Any document talks about this usage?

    val intList: List<Int> get() = concurrentLinkedQueue.toList()

>Solution :

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

These properties are called "computed properties", since they don’t have a backing field: in Java, you’d implement them using methods, rather than fields. You can find more examples in Properties: Getters and setters.

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading