title: Count unique tokens java
body: <p>I want to count unique characters in a string</p>
  
  <p>Input:</p>
  
  <pre><code>"aabbccdefgh"
  </code></pre>
  
  <p>Output:</p>
  
  <pre><code>8
  </code></pre>
  
  <p>My code doesn't work and throws an error:</p>
  
  <p>My code : </p>
  
  <pre><code>public class test {
  
      public static void main(String[] args) {
      String[] s = {""};
      int counter = 0;
      int pom  = 0;
      for(int i = 0; i &lt; s.length; i++){
          for(int y = 0; y &lt; 128; y++){
              if(s[i].compareTo(args[y])&gt;0){
                  pom++;
              }
          }
      }
      while(pom == 1){
          counter++;
      }
      System.out.println(counter);
  }
  }
  </code></pre>
  
  <p>Could someone point out where I've gone wrong?</p>