import javax.swing.JOptionPane; public class CopiaArray { public static void main(String[] args) { double[] v; int n; double somma; do { n=Integer.parseInt(JOptionPane.showInputDialog( "Digita dimensione del vettore (max 20)")); } while(n<0 || n>20); v=new double[n]; for(int i=0; i