title: How to get only the last token using StringTokenizer in java
body: <p>I want to get only the last token from stringTokenizer
  See below is my code:</p>
  
  <pre><code>String assetClasses = "Gold:Stocks:Fixed Income:Commodity:Interest Rates";
  StringTokenizer token = new StringTokenizer(asseltClasses, ":");
  while (token.hasMoreElements()) 
  {
      System.out.println(token.nextToken());
  }
  </code></pre>
  
  <p>My expected output is:</p>
  
  <pre><code>The last token is : Interest Rates
  </code></pre>