How to check the similarity between two ints java
<p>I am trying to create an app where the user has to memorize a <code>random number</code> (17 digits long) and then enter what she/he remembers. </p>

<p>After generating the number, <em>how do I check how similar they are i.e. 10 of the digits match so it is 58% similar</em>.</p>