Frage im Vorstellungsgespräch bei Tripadvisor

Implement parseInt() without using Integer Class.

Antwort im Vorstellungsgespräch

Anonym

26. Mai 2015

Use Ascii value to get int value. and loop through the characters multiplying a counter by 10 to keep decimal places. Throw exception when ascii value is out of range and check initial positive or negative.