1 array_name.clone() 示例語句如下: 1 int[] targetArray=(int[])sourceArray.clone(); 注意:目標(biāo)數(shù)組如果已經(jīng)存在,將會被重構(gòu)。 例4 有一個長度為 8 的 scores 數(shù)組,因為程序需要,現(xiàn)在要定義一個名稱為 newScores 的數(shù)組來容納 scores 數(shù)組中的所有元素,可以使用 clone() 方法來將 scores 數(shù)組中的...
www.dbjr.com.cn/article/2045...htm 2025-5-17