The toString method of Integer finally calls Integer's toString(i) method.
This is the code snippet from that method.
If the value is less than or equeal to 10 , then it will return the same
string from string pool.
If the value is greater than 10 , it will create new string.
Hope it helps and also hope this kind of question won't be in the exam