title: How do i generate a 4-digit pin with no duplicating number
body: <p>I'm new to android programming and i want to make a 4 Digit PIN generator without any repeats. How do I do it?? I don't know how to loop that very well yet. Thank you!!</p>
  
  <p>I already tried Random but it gives me numbers that repeat.</p>
  
  <pre><code>int randomPIN = (int)(Math.random()*9000)+1000;
  
  String pin = String.valueOf(randomPIN);
  dummy.setText(pin);
  </code></pre>
  
  <p>I'm looking for an outcome of 1354, 4682, 3645 but the results are mostly 3344, 6577, 1988</p>