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

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.

主站蜘蛛池模板: 丽水市| 灵武市| 应用必备| 祁阳县| 南江县| 定安县| 南陵县| 云安县| 巍山| 泸州市| 仙桃市| 化德县| 丰都县| 江永县| 昌平区| 鄯善县| 舞钢市| 巴里| 和顺县| 武定县| 泰和县| 奎屯市| 富宁县| 通江县| 壤塘县| 炉霍县| 那曲县| 青铜峡市| 淮北市| 临高县| 旬阳县| 阳城县| 阜城县| 满城县| 吉水县| 和顺县| 平乡县| 东辽县| 合江县| 上饶县| 滕州市|