开发者

android package

开发者 https://www.devze.com 2023-03-30 01:54 出处:网络
I am new to android development. I have a doubt that while creating an android project (using Eclipse) it asks to specify a package name in project propert开发者_Python百科ies which is in the form s

I am new to android development.

I have a doubt that while creating an android project (using Eclipse) it asks to specify a package name in project propert开发者_Python百科ies which is in the form sample.android but not single name like sample.

What is the reason behind it to follow such naming convention?


just go through these lines--->For example, if an organization in Canada called MySoft creates a package to deal with fractions, naming the package ca.mysoft.fractions distinguishes the fractions package from another similar package created by another company. If a US company named MySoft also creates a fractions package, but names it us.mysoft.fractions, then the classes in these two packages are defined in a unique and separate namespace.


this is just plain programming convetion.

to avoid conflicts with other company, developer's packages.

check this link. http://en.wikipedia.org/wiki/Java_package#Package_naming_conventions

0

精彩评论

暂无评论...
验证码 换一张
取 消