Java checkstyle - constructor definition in the wrong order

I have a class that looks like this:

public final class OrderedSetList<T extends Comparable<? super T>> implements OrderedSet<T> { // Constructor definition in wrong order checkstyle error next line public OrderedSetList() { // Initializations } } 

Can someone tell me why the constructor has a "Defining the constructor in the wrong order" ?

This is the destination, and we have our own checkstyle configurations, and any validation error is not allowed.

I greatly appreciated your help.

+6
source share
1 answer

The validation rule rule ensures that you follow the code rules for the order of your ads:

Parts of a class or interface declaration should be displayed in the following order:
Class (static) variables . First, variables of the open class, then protected, then the packet level (without access modifier), and then the private one.
Instance variables . First, variables of the open class, then protected, then the packet level (without access modifier), and then the private one.
Constructors
Methods

He wants the constructor to be the first method.

+13
source

All Articles