- Android Development with Kotlin
- Marcin Moskala Igor Wojda
- 128字
- 2021-07-02 18:48:32
Alternative ways to run Kotlin code
Android Studio offers an alternative way of running Kotlin code without the need to run the Android application. This is useful when you want to quickly test some Kotlin code separately from the long Android compilation and deployment process.
The way to run Kotlin code is to use the Kotlin Read Eval Print Loop (REPL). REPL is a simple language shell that reads single user input, evaluates it, and prints the result:

REPL looks like the command-line, but it will provide us with all the required code hints and will give us access to various structures defined inside the project (classes, interfaces, top-level functions, and so on):

The biggest advantage of REPL is its speed. We can test Kotlin code really quickly.
推薦閱讀
- Python快樂編程:人工智能深度學習基礎
- Java應用與實戰
- Instant Apache Stanbol
- JavaScript 網頁編程從入門到精通 (清華社"視頻大講堂"大系·網絡開發視頻大講堂)
- Production Ready OpenStack:Recipes for Successful Environments
- Git高手之路
- SQL基礎教程(視頻教學版)
- Java Web開發就該這樣學
- 智能手機APP UI設計與應用任務教程
- Xamarin Blueprints
- TypeScript 2.x By Example
- Mastering Apache Camel
- Python 3快速入門與實戰
- 嵌入式C編程實戰
- C語言程序設計教程