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

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.

主站蜘蛛池模板: 城市| 阜城县| 康平县| 武鸣县| 绵竹市| 霞浦县| 丰宁| 景洪市| 阳春市| 六安市| 洛宁县| 运城市| 开远市| 扶余县| 嘉义市| 五河县| 华坪县| 大同市| 谷城县| 扬中市| 天全县| 北海市| 监利县| 黔南| 阜宁县| 航空| 时尚| 习水县| 运城市| 大同县| 静海县| 龙井市| 嘉兴市| 林口县| 顺平县| 墨玉县| 屯门区| 西昌市| 茌平县| 沂南县| 长顺县|