java - math.pow() is not working and seems to be fine -
java - math.pow() is not working and seems to be fine -
hi guys have next code , retuning exception saying "double cannot converted string"; me looks fine dont know if missing something. thanks;
double operadord=this.naleatoreo.nextint(9); double operandod=this.naleatoreo.nextint(3); double potencia =math.pow(operadord, operandod); generarespuestas(integer.parseint(potencia)); break; *generarespuesta receives int, thats why converte int.
parseint takes string. if want convert double int, parseint not way. 1 way, (loss of precision aside) cast it.
generarespuestas((int)potencia); java math
Comments
Post a Comment