Well ,I find this a very petty concern , though I'm not able to get through it. I have been through so many questions here, but no one was of exact help.
I am trying to type cast a double value to int in following way :
int res=int(Math.pow(2,3)); and it throws a error: '.class' expected .
Any help on this would be highly appreciated.
Thanks
int(..)does and why do you think so?Math.pow(2,3)results to8.0, double type value. Soint(Math.pow(2,3))must result into an int type value. In fact , this is what I have found wherever I have seen.