Untitled


SUBMITTED BY: Guest

DATE: Dec. 10, 2013, 12:49 a.m.

FORMAT: Text only

SIZE: 343 Bytes

HITS: 838

  1. private double getDouble(String str)
  2. {
  3. try
  4. {
  5. double d = Double.parseDouble(str);
  6. if(d <= 0 || d > 100) return 0;
  7. else return d;
  8. }
  9. catch(Exception e)
  10. {
  11. //silently catch it
  12. }
  13. return 0.0;
  14. }

comments powered by Disqus