how do i create an array where I want there to be 8 values in an array but the user inputs them?
this is what i have so far
import ja
you should declare your array
as:
double[] num_students = new double[8];
And int FINAL MIN_STAFF = 7;
should be FINAL int MIN_STAFF = 7;
Then you may assign the value using JOptionPane
by doing:
int i=0;
while(i<8){
try{
num_students[i]=Double.parseDouble(JOptionPane.showInputDialog("Enter Number:"));
i++;
}
catch(Exception e){
JOptionPane.showMessageDialog(null, "Please enter valid number");
}
}