Question in creating package(com.example.myfirstjava)
Hi, This is my first post here in this forum, I just want to ask help to enligthen my mind about,why should we create package like this com.example.myfirstjava ?
what is the difference if we could not specify the package.
Thank you in advance.
请先登录再写评论。
Hello,
Am I right understanding that you're asking why it's recommended to use packages in java? (as an alternative to keep all classes at default package (no package declaration at a class))
Denis
HI,
yes.
what do you mean no package declaration at a class?
Ok, let me re-phraze the question - am I right understanding that you're asking why it's recommended to use packages in java?
Denis
I do not see any reason to create something like "com.example.myfirstjava", if you do not have a domain or a company.
So I just go with "surname.project"