-1

i would like to check if a variable is a bigDecimal, is there a method for that?

my code:

private KeystrokeTextField myRate;

// how can i check if myRate.getText() is a bigdecimal?
BifDecimal test = myRate.getText();
DouzeBri DouzeBra
  • 117
  • 1
  • 2
  • 13

1 Answers1

0

Try to create a BigDecimal (meaning, call the BigDecimal constructor) using that text. Wrap that call inside a try/catch.

DanGordon
  • 671
  • 3
  • 8
  • 26