⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 array.html

📁 API資料大全
💻 HTML
📖 第 1 页 / 共 4 页
字号:
<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Creates a new array with the specified component type and dimensions.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static&nbsp;void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../java/lang/reflect/Array.html#set(java.lang.Object, int, java.lang.Object)">set</A></B>(<A HREF="../../../java/lang/Object.html">Object</A>&nbsp;array,    int&nbsp;index,    <A HREF="../../../java/lang/Object.html">Object</A>&nbsp;value)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Sets the value of the indexed component of the specified array object to the specified new value.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static&nbsp;void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../java/lang/reflect/Array.html#setBoolean(java.lang.Object, int, boolean)">setBoolean</A></B>(<A HREF="../../../java/lang/Object.html">Object</A>&nbsp;array,           int&nbsp;index,           boolean&nbsp;z)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Sets the value of the indexed component of the specified array object to the specified <code>boolean</code> value.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static&nbsp;void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../java/lang/reflect/Array.html#setByte(java.lang.Object, int, byte)">setByte</A></B>(<A HREF="../../../java/lang/Object.html">Object</A>&nbsp;array,        int&nbsp;index,        byte&nbsp;b)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Sets the value of the indexed component of the specified array object to the specified <code>boolean</code> value.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static&nbsp;void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../java/lang/reflect/Array.html#setChar(java.lang.Object, int, char)">setChar</A></B>(<A HREF="../../../java/lang/Object.html">Object</A>&nbsp;array,        int&nbsp;index,        char&nbsp;c)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Sets the value of the indexed component of the specified array object to the specified <code>byte</code> value.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static&nbsp;void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../java/lang/reflect/Array.html#setDouble(java.lang.Object, int, double)">setDouble</A></B>(<A HREF="../../../java/lang/Object.html">Object</A>&nbsp;array,          int&nbsp;index,          double&nbsp;d)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Sets the value of the indexed component of the specified array object to the specified <code>double</code> value.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static&nbsp;void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../java/lang/reflect/Array.html#setFloat(java.lang.Object, int, float)">setFloat</A></B>(<A HREF="../../../java/lang/Object.html">Object</A>&nbsp;array,         int&nbsp;index,         float&nbsp;f)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Sets the value of the indexed component of the specified array object to the specified <code>float</code> value.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static&nbsp;void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../java/lang/reflect/Array.html#setInt(java.lang.Object, int, int)">setInt</A></B>(<A HREF="../../../java/lang/Object.html">Object</A>&nbsp;array,       int&nbsp;index,       int&nbsp;i)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Sets the value of the indexed component of the specified array object to the specified <code>int</code> value.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static&nbsp;void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../java/lang/reflect/Array.html#setLong(java.lang.Object, int, long)">setLong</A></B>(<A HREF="../../../java/lang/Object.html">Object</A>&nbsp;array,        int&nbsp;index,        long&nbsp;l)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Sets the value of the indexed component of the specified array object to the specified <code>long</code> value.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static&nbsp;void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../java/lang/reflect/Array.html#setShort(java.lang.Object, int, short)">setShort</A></B>(<A HREF="../../../java/lang/Object.html">Object</A>&nbsp;array,         int&nbsp;index,         short&nbsp;s)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Sets the value of the indexed component of the specified array object to the specified <code>short</code> value.</TD></TR></TABLE>&nbsp;<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>&nbsp;<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="newInstance(java.lang.Class, int)"><!-- --></A><H3>newInstance</H3><PRE>public static <A HREF="../../../java/lang/Object.html">Object</A> <B>newInstance</B>(<A HREF="../../../java/lang/Class.html">Class</A>&nbsp;componentType,                                 int&nbsp;length)                          throws <A HREF="../../../java/lang/NegativeArraySizeException.html">NegativeArraySizeException</A></PRE><DL><DD>Creates a new array with the specified component type and length. Invoking this method is equivalent to creating an array as follows: <blockquote> <pre> int[] x = {length}; Array.newInstance(componentType, x); </pre> </blockquote><DD><DL><DT><B>Parameters:</B><DD><CODE>componentType</CODE> - the <code>Class</code> object representing the component type of the new array<DD><CODE>length</CODE> - the length of the new array<DT><B>Returns:</B><DD>the new array<DT><B>Throws:</B><DD><CODE><A HREF="../../../java/lang/NullPointerException.html">NullPointerException</A></CODE> - if the specified <code>componentType</code> parameter is null<DD><CODE><A HREF="../../../java/lang/NegativeArraySizeException.html">NegativeArraySizeException</A></CODE> - if the specified <code>length</code>  is negative</DL></DD></DL><HR><A NAME="newInstance(java.lang.Class, int[])"><!-- --></A><H3>newInstance</H3><PRE>public static <A HREF="../../../java/lang/Object.html">Object</A> <B>newInstance</B>(<A HREF="../../../java/lang/Class.html">Class</A>&nbsp;componentType,                                 int[]&nbsp;dimensions)                          throws <A HREF="../../../java/lang/IllegalArgumentException.html">IllegalArgumentException</A>,                                 <A HREF="../../../java/lang/NegativeArraySizeException.html">NegativeArraySizeException</A></PRE><DL><DD>Creates a new array with the specified component type and dimensions.  If <code>componentType</code> represents a non-array class or interface, the new array has <code>dimensions.length</code> dimensions and&nbsp; <code>componentType&nbsp;</code> as its component type. If <code>componentType</code> represents an array class, the number of dimensions of the new array is equal to the sum of <code>dimensions.length</code> and the number of dimensions of <code>componentType</code>. In this case, the component type of the new array is the component type of <code>componentType</code>.  <p>The number of dimensions of the new array must not exceed the number of array dimensions supported by the implementation (typically 255).<DD><DL><DT><B>Parameters:</B><DD><CODE>componentType</CODE> - the <code>Class</code> object representing the component type of the new array<DD><CODE>dimensions</CODE> - an array of <code>int</code> types representing the dimensions of the new array<DT><B>Returns:</B><DD>the new array<DT><B>Throws:</B><DD><CODE><A HREF="../../../java/lang/NullPointerException.html">NullPointerException</A></CODE> - if the specified  <code>componentType</code> argument is null<DD><CODE><A HREF="../../../java/lang/IllegalArgumentException.html">IllegalArgumentException</A></CODE> - if the specified <code>dimensions</code>  argument is a zero-dimensional array, or if the number of requested dimensions exceeds the limit on the number of array dimensions  supported by the implementation (typically 255).<DD><CODE><A HREF="../../../java/lang/NegativeArraySizeException.html">NegativeArraySizeException</A></CODE> - if any of the components in the specified <code>dimensions</code> argument is negative.</DL></DD></DL><HR><A NAME="getLength(java.lang.Object)"><!-- --></A><H3>getLength</H3><PRE>public static int <B>getLength</B>(<A HREF="../../../java/lang/Object.html">Object</A>&nbsp;array)                     throws <A HREF="../../../java/lang/IllegalArgumentException.html">IllegalArgumentException</A></PRE><DL><DD>Returns the length of the specified array object, as an <code>int</code>.<DD><DL><DT><B>Parameters:</B><DD><CODE>array</CODE> - the array<DT><B>Returns:</B><DD>the length of the array<DT><B>Throws:</B><DD><CODE><A HREF="../../../java/lang/IllegalArgumentException.html">IllegalArgumentException</A></CODE> - if the object argument is not an array</DL></DD></DL><HR><A NAME="get(java.lang.Object, int)"><!-- --></A><H3>get</H3><PRE>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -