Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can we use camel case in java package naming? [duplicate]

Tags:

java

For example: Which of the following package names is correct?

com.google.payrolldivision;

or

com.google.payrollDivision;

Please just answer the question without beating around the bush?

like image 862
The Guest Avatar asked Mar 09 '26 05:03

The Guest


2 Answers

Please just answer the question

OK, then taking your question as a "a xor b", the answer is

com.google.payrolldivision;

as per https://docs.oracle.com/javase/tutorial/java/package/namingpkgs.html.

However, your title and post ask two very different questions, so it's hard to "just answer the question".

like image 86
Ingo Bürk Avatar answered Mar 11 '26 18:03

Ingo Bürk


According to the Oracle webpage, you should write your package name in lowercase.

Package names are written in all lower case to avoid conflict with the names of classes or interfaces.

like image 36
Alberto Alegria Avatar answered Mar 11 '26 17:03

Alberto Alegria



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!