- 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.
推薦閱讀
- DB2 V9權威指南
- 新一代通用視頻編碼H.266/VVC:原理、標準與實現
- 架構不再難(全5冊)
- AngularJS Web Application Development Blueprints
- QGIS By Example
- Learning Zurb Foundation
- Mastering Unity 2D Game Development(Second Edition)
- Learning Material Design
- JavaScript應用開發實踐指南
- Backbone.js Testing
- PhoneGap 4 Mobile Application Development Cookbook
- Python硬件編程實戰
- Android 游戲開發大全(第二版)
- Java程序設計入門(第2版)
- MySQL從入門到精通