double ABC = - UTIL_COMMON.fnChkDouble(lStr);
Above statement, is it valid or not?
Thanks
double ABC = - UTIL_COMMON.fnChkDouble(lStr);
Above statement, is it valid or not?
Thanks
Yes, it's valid as long as the operator -
can be applied to the return type of UTIL_COMMON.fnChkDouble()
. As you want to assign a double, this method most probably returns a double, so this is valid code.
It is impossible to say without seeing the declaration of lstr
and the method signature of fnChkDouble
.