Address a Package name by a shorter name

房东的猫 提交于 2020-01-06 15:08:10

问题


I have arranged my .java files in a folder-subfolder-* structure. My initial package name is (e.g)

com.company.app

Therefore the .java files in a would have a namespace / package of

com.company.app.folder1.folder2

And to access any of the classes from the com.company.app I have to prefix the class name with the package name.

com.company.app.Game

I was wondering if there is a way to set an alias or a pointer to a package(name) and then be able to just use the pointer ?

like so

app.Game 

Is this possible ?

来源:https://stackoverflow.com/questions/28882351/address-a-package-name-by-a-shorter-name

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!