Literals

A refresher on what a literal is, and examples of integer, string, object and function literals (and also what literals are not) in Kotlin

Gabriel Shanahan
The Kotlin Primer

--

— — — — — — — — — — — — — — —

THE CURRENT VERSION OF THIS ARTICLE IS PUBLISHED HERE.

— — — — — — — — — — — — — — —

Tags: #FYI

This article is part of the Kotlin Primer, an opinionated guide to the Kotlin language, which is indented to help facilitate Kotlin adoption inside Java-centric organizations. It was originally written as an organizational learning resource for Etnetera a.s. and I would like to express my sincere gratitude for their support.

It is recommended to read the Introduction before moving on. Check out the Table of Contents for all articles.

This is one of those theoretical-wibbly-wobbly-timey-wimey things we need to talk about briefly so that we understand each other in the following sections.

The word “literal” is one of those words that you see all over the place, but never really paid much attention to because it didn’t play an important role in understanding whatever it was you were reading.

--

--