- 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.
推薦閱讀
- Drupal 8 Blueprints
- Vue.js前端開發(fā)基礎與項目實戰(zhàn)
- Mastering Ember.js
- JIRA 7 Administration Cookbook(Second Edition)
- C語言程序設計
- Building Mobile Applications Using Kendo UI Mobile and ASP.NET Web API
- C語言程序設計
- Mastering RStudio:Develop,Communicate,and Collaborate with R
- Linux操作系統(tǒng)基礎案例教程
- SciPy Recipes
- Android Game Programming by Example
- Mastering Apache Camel
- UML基礎與Rose建模實用教程(第三版)
- After Effects CC案例設計與經典插件(視頻教學版)
- 城市信息模型平臺頂層設計與實踐