📄 arrays.html
字号:
Sorts the specified array of chars into ascending numerical order.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static void</CODE></FONT></TD><TD><CODE><B><A HREF="../../java/util/Arrays.html#sort(char[], int, int)">sort</A></B>(char[] a, int fromIndex, int toIndex)</CODE><BR> Sorts the specified range of the specified array of chars into ascending numerical order.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static void</CODE></FONT></TD><TD><CODE><B><A HREF="../../java/util/Arrays.html#sort(double[])">sort</A></B>(double[] a)</CODE><BR> Sorts the specified array of doubles into ascending numerical order.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static void</CODE></FONT></TD><TD><CODE><B><A HREF="../../java/util/Arrays.html#sort(double[], int, int)">sort</A></B>(double[] a, int fromIndex, int toIndex)</CODE><BR> Sorts the specified range of the specified array of doubles into ascending numerical order.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static void</CODE></FONT></TD><TD><CODE><B><A HREF="../../java/util/Arrays.html#sort(float[])">sort</A></B>(float[] a)</CODE><BR> Sorts the specified array of floats into ascending numerical order.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static void</CODE></FONT></TD><TD><CODE><B><A HREF="../../java/util/Arrays.html#sort(float[], int, int)">sort</A></B>(float[] a, int fromIndex, int toIndex)</CODE><BR> Sorts the specified range of the specified array of floats into ascending numerical order.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static void</CODE></FONT></TD><TD><CODE><B><A HREF="../../java/util/Arrays.html#sort(int[])">sort</A></B>(int[] a)</CODE><BR> Sorts the specified array of ints into ascending numerical order.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static void</CODE></FONT></TD><TD><CODE><B><A HREF="../../java/util/Arrays.html#sort(int[], int, int)">sort</A></B>(int[] a, int fromIndex, int toIndex)</CODE><BR> Sorts the specified range of the specified array of ints into ascending numerical order.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static void</CODE></FONT></TD><TD><CODE><B><A HREF="../../java/util/Arrays.html#sort(long[])">sort</A></B>(long[] a)</CODE><BR> Sorts the specified array of longs into ascending numerical order.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static void</CODE></FONT></TD><TD><CODE><B><A HREF="../../java/util/Arrays.html#sort(long[], int, int)">sort</A></B>(long[] a, int fromIndex, int toIndex)</CODE><BR> Sorts the specified range of the specified array of longs into ascending numerical order.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static void</CODE></FONT></TD><TD><CODE><B><A HREF="../../java/util/Arrays.html#sort(java.lang.Object[])">sort</A></B>(<A HREF="../../java/lang/Object.html">Object</A>[] a)</CODE><BR> Sorts the specified array of objects into ascending order, according to the <i>natural ordering</i> of its elements.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static void</CODE></FONT></TD><TD><CODE><B><A HREF="../../java/util/Arrays.html#sort(java.lang.Object[], java.util.Comparator)">sort</A></B>(<A HREF="../../java/lang/Object.html">Object</A>[] a, <A HREF="../../java/util/Comparator.html">Comparator</A> c)</CODE><BR> Sorts the specified array of objects according to the order induced by the specified comparator.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static void</CODE></FONT></TD><TD><CODE><B><A HREF="../../java/util/Arrays.html#sort(java.lang.Object[], int, int)">sort</A></B>(<A HREF="../../java/lang/Object.html">Object</A>[] a, int fromIndex, int toIndex)</CODE><BR> Sorts the specified range of the specified array of objects into ascending order, according to the <i>natural ordering</i> of its elements.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static void</CODE></FONT></TD><TD><CODE><B><A HREF="../../java/util/Arrays.html#sort(java.lang.Object[], int, int, java.util.Comparator)">sort</A></B>(<A HREF="../../java/lang/Object.html">Object</A>[] a, int fromIndex, int toIndex, <A HREF="../../java/util/Comparator.html">Comparator</A> c)</CODE><BR> Sorts the specified range of the specified array of objects according to the order induced by the specified comparator.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static void</CODE></FONT></TD><TD><CODE><B><A HREF="../../java/util/Arrays.html#sort(short[])">sort</A></B>(short[] a)</CODE><BR> Sorts the specified array of shorts into ascending numerical order.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static void</CODE></FONT></TD><TD><CODE><B><A HREF="../../java/util/Arrays.html#sort(short[], int, int)">sort</A></B>(short[] a, int fromIndex, int toIndex)</CODE><BR> Sorts the specified range of the specified array of shorts into ascending numerical order.</TD></TR></TABLE> <A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"><TD><B>Methods inherited from class java.lang.<A HREF="../../java/lang/Object.html">Object</A></B></TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE><A HREF="../../java/lang/Object.html#clone()">clone</A>, <A HREF="../../java/lang/Object.html#equals(java.lang.Object)">equals</A>, <A HREF="../../java/lang/Object.html#finalize()">finalize</A>, <A HREF="../../java/lang/Object.html#getClass()">getClass</A>, <A HREF="../../java/lang/Object.html#hashCode()">hashCode</A>, <A HREF="../../java/lang/Object.html#notify()">notify</A>, <A HREF="../../java/lang/Object.html#notifyAll()">notifyAll</A>, <A HREF="../../java/lang/Object.html#toString()">toString</A>, <A HREF="../../java/lang/Object.html#wait()">wait</A>, <A HREF="../../java/lang/Object.html#wait(long)">wait</A>, <A HREF="../../java/lang/Object.html#wait(long, int)">wait</A></CODE></TD></TR></TABLE> <P><!-- ============ FIELD DETAIL =========== --><!-- ========= CONSTRUCTOR DETAIL ======== --><!-- ============ METHOD DETAIL ========== --><A NAME="method_detail"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TD COLSPAN=1><FONT SIZE="+2"><B>Method Detail</B></FONT></TD></TR></TABLE><A NAME="sort(long[])"><!-- --></A><H3>sort</H3><PRE>public static void <B>sort</B>(long[] a)</PRE><DL><DD>Sorts the specified array of longs into ascending numerical order. The sorting algorithm is a tuned quicksort, adapted from Jon L. Bentley and M. Douglas McIlroy's "Engineering a Sort Function", Software-Practice and Experience, Vol. 23(11) P. 1249-1265 (November 1993). This algorithm offers n*log(n) performance on many data sets that cause other quicksorts to degrade to quadratic performance.<DD><DL><DT><B>Parameters:</B><DD><CODE>a</CODE> - the array to be sorted.</DL></DD></DL><HR><A NAME="sort(long[], int, int)"><!-- --></A><H3>sort</H3><PRE>public static void <B>sort</B>(long[] a, int fromIndex, int toIndex)</PRE><DL><DD>Sorts the specified range of the specified array of longs into ascending numerical order. The range to be sorted extends from index <tt>fromIndex</tt>, inclusive, to index <tt>toIndex</tt>, exclusive. (If <tt>fromIndex==toIndex</tt>, the range to be sorted is empty.) <p>The sorting algorithm is a tuned quicksort, adapted from Jon L. Bentley and M. Douglas McIlroy's "Engineering a Sort Function", Software-Practice and Experience, Vol. 23(11) P. 1249-1265 (November 1993). This algorithm offers n*log(n) performance on many data sets that cause other quicksorts to degrade to quadratic performance.<DD><DL><DT><B>Parameters:</B><DD><CODE>a</CODE> - the array to be sorted.<DD><CODE>fromIndex</CODE> - the index of the first element (inclusive) to be sorted.<DD><CODE>toIndex</CODE> - the index of the last element (exclusive) to be sorted.<DT><B>Throws:</B><DD><CODE><A HREF="../../java/lang/IllegalArgumentException.html">IllegalArgumentException</A></CODE> - if <tt>fromIndex > toIndex</tt><DD><CODE><A HREF="../../java/lang/ArrayIndexOutOfBoundsException.html">ArrayIndexOutOfBoundsException</A></CODE> - if <tt>fromIndex < 0</tt> or <tt>toIndex > a.length</tt></DL></DD></DL><HR><A NAME="sort(int[])"><!-- --></A><H3>sort</H3><PRE>public static void <B>sort</B>(int[] a)</PRE><DL><DD>Sorts the specified array of ints into ascending numerical order. The sorting algorithm is a tuned quicksort, adapted from Jon L. Bentley and M. Douglas McIlroy's "Engineering a Sort Function", Software-Practice and Experience, Vol. 23(11) P. 1249-1265 (November 1993). This algorithm offers n*log(n) performance on many data sets that cause other quicksorts to degrade to quadratic performance.<DD><DL><DT><B>Parameters:</B><DD><CODE>a</CODE> - the array to be sorted.</DL></DD></DL><HR><A NAME="sort(int[], int, int)"><!-- --></A><H3>sort</H3><PRE>public static void <B>sort</B>(int[] a, int fromIndex, int toIndex)</PRE><DL><DD>Sorts the specified range of the specified array of ints into ascending numerical order. The range to be sorted extends from index <tt>fromIndex</tt>, inclusive, to index <tt>toIndex</tt>, exclusive. (If <tt>fromIndex==toIndex</tt>, the range to be sorted is empty.)<p> The sorting algorithm is a tuned quicksort, adapted from Jon L. Bentley and M. Douglas McIlroy's "Engineering a Sort Function", Software-Practice and Experience, Vol. 23(11) P. 1249-1265 (November 1993). This algorithm offers n*log(n) performance on many data sets that cause other quicksorts to degrade to quadratic performance.<DD><DL><DT><B>Parameters:</B><DD><CODE>a</CODE> - the array to be sorted.<DD><CODE>fromIndex</CODE> - the index of the first element (inclusive) to be sorted.<DD><CODE>toIndex</CODE> - the index of the last element (exclusive) to be sorted.<DT><B>Throws:</B><DD><CODE><A HREF="../../java/lang/IllegalArgumentException.html">IllegalArgumentException</A></CODE> - if <tt>fromIndex > toIndex</tt><DD><CODE><A HREF="../../java/lang/ArrayIndexOutOfBoundsException.html">ArrayIndexOutOfBoundsException</A></CODE> - if <tt>fromIndex < 0</tt> or <tt>toIndex > a.length</tt></DL></DD></DL><HR>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -