I need to convert String
into Decimal
. the isNumeric() method is retuning false
if value is Decimal
. Another alternate:
try
{
Integer x = Integer.valueOf(myString);
}
catch (exception e)
{
// it's not an Integer, try something else
}
Is there any other way to convert Decimal
into String
?
Note: value which is coming can be Integer
or String
.
if (searchKey.isNumeric() && Decimal.valueof(searchKey.trim()) <= SISConstants.MAX_LOAN_AMT)
– Kuldeep Parihar Dec 17 '15 at 6:20