title: Why Arrays.asList(...).contains(...) isn't working?
body: <p>I'm starting to create game and now I'm testing for player input.</p>
  
  <pre><code>package main;
  
  import java.io.IOException;
  import java.io.InputStreamReader;
  import java.util.Arrays;
  
  public class Game {
  
      public static void main(String[] args) throws IOException {
          final char[] keyCodesArray = {'w','a','s','d'};
  
          while(true) {
              char tmp = (char) new InputStreamReader(System.in).read ();
              if(Arrays.asList(keyCodesArray).contains(tmp)) {
                  System.out.println("You entered : " + tmp);
              } else {
                  System.out.println("Type valid game char");
              }
          }
      }
  }
  </code></pre>
  
  <p>Why, when I press 'w' or 'a', console prints second communicate: "Type valid game char" and not the first one? I searched StackOverflow for an answer but nothing really helped me.</p>