title: Java equivalent of Javascript prototype
body: <p>In JavaScript, you can do this.</p>
  
  <pre><code>String.prototype.removeNumericalCharacters = function(){
      ...code...
  }
  </code></pre>
  
  <p>or</p>
  
  <pre><code>Number.prototype.addTwo = function(){
      ...code...
  }
  var a = 5;
  a.addTwo();
  //a is now 7
  </code></pre>
  
  <p>Is there a way to do something similar in Java? (I don't mean the actual function, just using that as an example)</p>
  
  <p>An example in Java would be</p>
  
  <pre><code>int a = 5;
  a.addTwo();
  //A is now 7
  </code></pre>
  
  <p>My question is how do I define the .addTwo() method.</p>