Monitise interview question

Explain how Integer.parseInt(str) is implemented