hey 7anzala I'm new to the java language but i tried to see what's the problem in this project I am not familiar with the command you are using for the dialog box(which i think is your problem) but here is my way to wright this project :
The class :
import javax.swing.JOptionPane;
public class Test_Array {
public static void fillArray(int[] value){
String valueInput;
String length;
length = JOptionPane.showInputDialog("how much value to store ?");
value = new int[Integer.parseInt(length)];
for(int i=0; i<value.length; i++)
{
valueInput = JOptionPane.showInputDialog("please insert an integer value");
value[i]=Integer.parseInt(valueInput);
}
for (int i=0;i<value.length;i++){
System.out.println("value ["+i+"] = "+value[i]);
}
}
}
The main class :
public class Main {
public static void main(String[] args) {
int[] a = null ;
Test_Array.fillArray(a);
}
}
PS: the last for loop is to display the affected values in the array.
good luck
hope i helped you

.......