public class DoubleArray
{
static Console c; // The output console
static final int total = 20;
String[] numStr = new String [total];
static double numDbl;
static String stop = "";
public void getAndStoreInput ()
{
int count = 0;
do
{
c.print ("Enter number" + (count + 1));
c.print (": ");
while ((numStr [count] = c.readLine ()) != stop)
{
try
{
numDbl = Double.parseDouble (numStr [count]);
count++;
break;
}
catch (NumberFormatException e)
{
new Message ("Invalid. Please Try Again");
}
}
}
while (count < total);
}
Isn't my code supposed to stop getting input when the user just press enter without any characters?