官术网_书友最值得收藏!

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.

主站蜘蛛池模板: 探索| 杭锦后旗| 三台县| 油尖旺区| 镇平县| 务川| 财经| 绩溪县| 开封市| 新宁县| 宁城县| 云安县| 务川| 麻阳| 宁陵县| 公安县| 诏安县| 岳池县| 张掖市| 安达市| 乐山市| 依兰县| 宣恩县| 和田市| 安顺市| 阳信县| 华容县| 正定县| 洱源县| 甘孜县| 原阳县| 义马市| 裕民县| 平昌县| 丹巴县| 华容县| 永丰县| 鹤山市| 安庆市| 长春市| 时尚|