rspec/rules/S1124/java/rule.adoc
2021-06-02 20:44:38 +02:00

39 lines
701 B
Plaintext

The Java Language Specification recommends listing modifiers in the following order:
. Annotations
. public
. protected
. private
. abstract
. static
. final
. transient
. volatile
. synchronized
. native
. strictfp
Not following this convention has no technical impact, but will reduce the code's readability because most developers are used to the standard order.
== Noncompliant Code Example
----
static public void main(String[] args) { // Noncompliant
}
----
== Compliant Solution
----
public static void main(String[] args) { // Compliant
}
----
ifdef::rspecator-view[]
== Comments And Links
(visible only on this page)
include::../comments-and-links.adoc[]
endif::rspecator-view[]