Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Underscore in package name in Java - is it bad? [duplicate]

Sorry for my English

I think that sometimes it is necessary.

In my opinion search_result_list, location_provider are easier to read than searchresultlist, locationprovider.

What does the documentation say?

like image 980
Leonid Semyonov Avatar asked Mar 03 '14 11:03

Leonid Semyonov


People also ask

Can I use underscore in Java package name?

In Java you can use underscore ( _ ) in your package names and it conforms to Java naming conventions.

Can package name contain underscore?

Package names are all lowercase, with consecutive words simply concatenated together (no underscores). For example, com. example.

Should package name be singular or plural?

Use the plural for packages with homogeneous contents and the singular for packages with heterogeneous contents.

How Should Java packages be named?

Naming ConventionsPackage names are written in all lower case to avoid conflict with the names of classes or interfaces. Companies use their reversed Internet domain name to begin their package names—for example, com. example. mypackage for a package named mypackage created by a programmer at example.com .


1 Answers

Code Conventions could be found here!

I think code conventions are nothing to vary, so stick to such conventions if there exist any...

like image 126
PrR3 Avatar answered Oct 17 '22 04:10

PrR3