Читать книгу Programming Kotlin Applications - Бретт Мак-Лахлин, Brett McLaughlin - Страница 20

LISTING 1.2: A very useless object in Kotlin (and a main function to use it)

Оглавление

class Person { /* This class literally does nothing! */ } fun main() { val jennifer = Person() }

Now, this is pretty lame code, honestly. It doesn't do anything, but it is object-oriented. Before we can improve it, though, you need to be able to run this good-for-almost-nothing code yourself.

Programming Kotlin Applications

Подняться наверх