title: Is Character equals char autoboxed or unboxed in java?
body: <p>I'm thinking about this easy code:</p>
  
  <pre><code>Character s = 'n';
  System.out.println(s == 'y');
  System.out.println(s.equals('y'));
  
  s = 'y';
  System.out.println(s == 'y');
  System.out.println(s.equals('y'));
  </code></pre>
  
  <p>with result</p>
  
  <pre><code>false
  false
  true
  true
  </code></pre>
  
  <p>So the result is good but, how does this comparing work? Is Character object unboxed to char or chat is autoboxed to Character?</p>