Error
What does these error messages mean?
Validator.java:24: illegal start of type
return dataEntry;
^
Validator.java:24: <identifier> expected
return dataEntry
here is the code.
publicclass Validator
{
publicstaticdouble getIsValid(String dataEntry)
{
while (!dataEntry.equalsIgnoreCase("x"))
{
try
{
userEntry = Double.parseDouble(dataEntry);
if (userEntry > 100.00 || userEntry < 0.0)
{
thrownew Exception();
}
}
catch (Exception e)
{
String thirdMessage = ("Invalid entry. Please enter valid data");
dataEntry = JOptionPane.showInputDialog(strthirdMessage, JOptionPane.ERROR_MESSAGE);
}
}
}
return dataEntry;
}

