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;

}

[1568 byte] By [jeezaha] at [2007-11-27 2:22:41]
# 1
return dataEntry;Regard your braces! This line follows your method, rather than being the last line in the method.
DrLaszloJamfa at 2007-7-12 2:27:25 > top of Java-index,Java Essentials,New To Java...
# 2
return dataEntry;is outside of the method, move it above the } on the previous line to put it back at the end of the getIsValid method.
hunter9000a at 2007-7-12 2:27:25 > top of Java-index,Java Essentials,New To Java...
# 3
thank you
jeezaha at 2007-7-12 2:27:25 > top of Java-index,Java Essentials,New To Java...