title: Why do we ever need `hasArray()` method in CharBuffer?
body: <p>CharBuffer has methods <code>array()</code> and <code>hasArray()</code>. </p>
  
  <p>Why do we ever need <code>hasArray()</code>? </p>
  
  <p>After <code>CharBuffer buf = CharBuffer.allocate(20)</code>, <code>hasArray()</code> is always true, before - we cannot use buf reference b/c it is uninitialized.</p>