import javax.swing.JOptionPane; public class Test { /** * @zdz */ public static void main(String[] args) { double aArray[]= new double[]{1,2,3,4,5}; printArray(aArray); } public static void printArray(double aArray[]) { String output=""; aArray[1]=20; //aArray[]= new double[]{1,2,3,4,5}; aArray[1]=16; for(int i=0;i<aArray.length;i++) {output+=String.valueOf(aArray[i])+"\n";} JOptionPane.showMessageDialog(null,output); } }