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

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.

主站蜘蛛池模板: 九龙城区| 桓仁| 昭通市| 曲水县| 勃利县| 营山县| 民丰县| 东乌| 富锦市| 满洲里市| 五原县| 东乌珠穆沁旗| 邢台市| 北京市| 江源县| 壶关县| 平和县| 拉萨市| 株洲市| 潍坊市| 尼玛县| 鸡东县| 庆阳市| 宜宾县| 左权县| 焦作市| 合作市| 周宁县| 文山县| 阿鲁科尔沁旗| 凤凰县| 保定市| 定南县| 洪洞县| 上饶县| 西吉县| 曲阳县| 鹰潭市| 双峰县| 彭州市| 灵台县|