title: Why can't I see the contents in Java char array neither in eclipse console nor in the debugger?
body: <p>I not able to print char array to eclipse console or see the array contents while debugging in eclipse. I have written a program to return 1st non-repeating character index from a string using arrays. The program works &amp; is very straightforward, but I find it very amusing that I cannot see the contents of the char array while I manipulate/debug the program. The SOP statement prints <code>null</code> OR <code>\u0000</code>. How can I see the actual contents of array 'a' in the below program ?</p>
  
  <pre><code>public static int getFirstNPCv2 (String s) {
      char a[] = new char[26];
      s=s.toLowerCase();
      for (char c : s.toCharArray()){
          a[c - 'a']++;
          //System.out.println(a[c - 'a']);
      }
      System.out.println(a);
      for (char c : s.toCharArray()){
          if(a[c - 'a'] == 1){
              return s.indexOf(c);
          }
      }
      return -1;
  }
  </code></pre>
  
  <p><code>getFirstNPCv2("titanic")</code> returns 3 which is correct, but why can't I see the contents of array 'a'</p>