Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Add /*package*/ in package private class [closed]

Tags:

java

modifier

Is there any java standards that states that a package private class should have a /package/ in the beginning of the class name?

/*package*/ class MyPackagePrivateClass {
 private var1;
 private var2;
}
like image 742
whitefox Avatar asked Dec 01 '25 00:12

whitefox


1 Answers

Official standards, no. Standards set forth by a particular company or project, maybe.

The problem with standards that require certain documentation (JavaDocs aside) is that they'll have to make a linter to enforce it. Otherwise, it's a pretty useless piece of information.

However, there's nothing "official" about that particular comment style. As others have mentioned in the comments the fact the lack of public or private can either be deliberate or accidental may definitely prompt a particular group to enforce such a standard.

like image 124
Qix - MONICA WAS MISTREATED Avatar answered Dec 02 '25 12:12

Qix - MONICA WAS MISTREATED



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!