Is there a method in the Java library that I can use to find the exponent of a number? Example: If I enter 100, then I expect a return value of 2 (since 102 = 100). If I enter 10000, then I expect a return value of 4 (since 104 = 10000).
Or do I have to keep a counter and keep computing 10counter and check if that is my number. If yes return the counter else increment the counter by 1 and repeat.