title: how do u get the last character of the last string in java?
body: <p>I need to get the last character of the last input string. I wrote a piece of code that gets the last letter of the first string:</p>
  
  <pre><code>public class LastCharacter {
      public static void main(String[] args) {
          String string = args[0];
          System.out.println("last character: " + string.substring(string.length() -1)); 
      }
  }
  </code></pre>
  
  <p>How can I get the last character of the last string parameter?</p>