title: How to "invert" numbers in Java
body: <p>Lets say I have a number 1-5, now if I have 2, I want 4 as an output, if I had 3 then have 3 as the output, if I have 1 then 4 as the output. Here is a chart of what I want:</p>
  <p>1-10 Chart:</p>
  <pre><code>Give 1 return 9
  Give 2 return 8
  Give 3 return 7
  Give 4 return 6
  Give 5 return 5
  </code></pre>
  <p>What algorithm do I use for such a thing?</p>