提供了常用的JAVA技术的示例
源代码在线查看: arrayreference.java
package ArrayReference; import javax.swing.UIManager; import java.awt.*; public class ArrayReference { void setArray(int x[]) { for (int i=1;i x[0]=1; x[i]=i+x[i-1]; // System.out.print(x[i]+" "); } } public static void main(String[] args) { int a[]={0,0,0,0,0,0}; System.out.println("before changed:"); for(int i=0;i { System.out.print(a[i]+" "); } System.out.println(); ArrayReference arr=new ArrayReference(); System.out.println("after changed: "); arr.setArray(a); for(int i=0;i { System.out.print(a[i]+" "); } } }