private static int compareConstructors(Constructor c1, Constructor c2) {
    """
	When two constructors have the same access type (both public, both private, etc.)
	then compare constructors by parameter length (fewer params comes before more params).
	If parameter count is the same, then compare by parameter Class names.  If those are equal,
	which should never happen, then the constructurs are equal.
    """
        Class[] c1ParamTypes = c1.getParameterTypes();
        Class[] c2ParamTypes = c2.getParameterTypes();
        if (c1ParamTypes.length != c2ParamTypes.length)
        {   // negative value if c1 has less (less parameters will be chosen ahead of more), positive value otherwise.
            return c1ParamTypes.length - c2ParamTypes.length;
        }

        // Has same number of parameters.s
        int len = c1ParamTypes.length;
        for (int i=0; i < len; i++)
        {
            Class class1 = c1ParamTypes[i];
            Class class2 = c2ParamTypes[i];
            int compare = class1.getName().compareTo(class2.getName());
            if (compare != 0)
            {
                return compare;
            }
        }

        return 0;
    }
private static int compareConstructors(Constructor c1, Constructor c2)
    {
        Class[] c1ParamTypes = c1.getParameterTypes();
        Class[] c2ParamTypes = c2.getParameterTypes();
        if (c1ParamTypes.length != c2ParamTypes.length)
        {   // negative value if c1 has less (less parameters will be chosen ahead of more), positive value otherwise.
            return c1ParamTypes.length - c2ParamTypes.length;
        }

        // Has same number of parameters.s
        int len = c1ParamTypes.length;
        for (int i=0; i < len; i++)
        {
            Class class1 = c1ParamTypes[i];
            Class class2 = c2ParamTypes[i];
            int compare = class1.getName().compareTo(class2.getName());
            if (compare != 0)
            {
                return compare;
            }
        }

        return 0;
    }
private static int compareConstructors ( Constructor c1 , Constructor c2 ) { Class [ ] c1ParamTypes = c1 . getParameterTypes ( ) ; Class [ ] c2ParamTypes = c2 . getParameterTypes ( ) ; if ( c1ParamTypes . length != c2ParamTypes . length ) { // negative value if c1 has less (less parameters will be chosen ahead of more), positive value otherwise. return c1ParamTypes . length - c2ParamTypes . length ; } // Has same number of parameters.s int len = c1ParamTypes . length ; for ( int i = 0 ; i < len ; i ++ ) { Class class1 = c1ParamTypes [ i ] ; Class class2 = c2ParamTypes [ i ] ; int compare = class1 . getName ( ) . compareTo ( class2 . getName ( ) ) ; if ( compare != 0 ) { return compare ; } } return 0 ; }
When two constructors have the same access type (both public, both private, etc.)
then compare constructors by parameter length (fewer params comes before more params).
If parameter count is the same, then compare by parameter Class names.  If those are equal,
which should never happen, then the constructurs are equal.
When two constructors have the same access type ( both public both private etc . ) then compare constructors by parameter length ( fewer params comes before more params ) . If parameter count is the same then compare by parameter Class names . If those are equal which should never happen then the constructurs are equal .