title: Get last number from string
body: <p>I want to get the last character of a string and if it's a even number to do different actions based on that. Simple example:</p>
  
  <pre><code>Server_3
  </code></pre>
  
  <p>First I want to get the last value 3 </p>
  
  <pre><code>            String str = "Server_3";
              str.charAt(str.length()-1)
  </code></pre>
  
  <p>The problem is next how to construct the logic to have different cased based on that is this a even number or not. Can you help me to complete this? </p>