Читать книгу Programming Kotlin Applications - Бретт Мак-Лахлин, Brett McLaughlin - Страница 51
Name a File According to Its Class
ОглавлениеGo ahead and create a new Kotlin project. You can call it whatever you like; Kotlin_ch02
works if you need a suggestion. Then, in the src/
folder, create a new file called Person
. Your IDE will likely add the .kt
extension for you. Then, just drop in your existing Person
code from Chapter 1. That code is shown again in Listing 2.1 for good measure.