I want to know how to extract digits from a number.
The only method I can think of is converting the number to a string, then use substring() - THEN convert back to int.
Would there be a more efficient way, such that it obtains a specific number like the substring() method, but for an int or a BigInteger?