 <p>Reading your problem description <em>"each box contain 10 piece of numbered paper (1 - 10) but there is a number the same in all 3 boxes"</em> I take it that:</p> <ul> <li>each box has <strong>exactly</strong> ten pieces of paper</li> <li>each piece of paper has a number from 1 to 10 on it</li> <li>there is <strong>only</strong> one number that appears in all three boxes</li> <li>(hence, other numbers may appear more than once)</li> </ul> <p>Like here, where the number '8' is the only one to appear in all three boxes.</p> <pre><code> int[] a = new int[] { 3, 2, 7, 5, 8, 2, 10, 6, 9, 7, 3 }; int[] b = new int[] { 1, 4, 8, 7, 5, 1, 3, 2, 2, 4, 1 }; int[] c = new int[] { 8, 4, 1, 6, 10, 9, 6, 4, 9, 6, 4 }; </code></pre> <p>Is that your problem?</p> <p>Then you wrote: <em>"How to find that repeated number in java with an efficient/fastest way possible?"</em></p> <p>Now <em>how</em> efficient/fast do you want to be? Are you talking about O(n) efficient (even though the boxes are unsorted), like here (slightly obfuscated to confuse you a bit):</p> <pre><code> int s = 0; int t = 0; int u = 0; for (int i = 0; i &lt; 10; i++) { s |= 1 &lt;&lt; a[i]; t |= 1 &lt;&lt; b[i]; u |= 1 &lt;&lt; c[i]; } System.out.println( Integer.numberOfTrailingZeros( s &amp; t &amp; u ) ); </code></pre> <p>; )</p> <p>Somehow I'm not sure your teacher will think you came up with that answer : )</p>