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

Packages

It wouldn't be convenient to have all your classes and functions in the same folder or under the same namespace. That's the reason Kotlin, similar to many other languages, uses the notion of a package. 

Like Java, Kotlin uses packages:

package me.soshin.controllers

If you're mixing Java and Kotlin, Kotlin files should follow Java package rules.

In purely Kotlin projects, common package prefixes can be omitted from the folder structure. For example, if all your projects are under the me.soshin package, place your controllers in the /controllers folder and not in the /me/soshin/controllers folder like Java does.

主站蜘蛛池模板: 油尖旺区| 岳西县| 霍州市| 灯塔市| 卫辉市| 康马县| 嘉荫县| 行唐县| 怀宁县| 项城市| 张掖市| 手游| 徐汇区| 贵州省| 神木县| 张家港市| 仁化县| 肃南| 白城市| 闽清县| 琼结县| 当雄县| 嘉黎县| 娄底市| 新丰县| 延津县| 苏尼特左旗| 平湖市| 台东县| 枣庄市| 昌邑市| 白山市| 墨竹工卡县| 广南县| 衡阳市| 财经| 同心县| 杨浦区| 德江县| 巴林右旗| 南充市|