title: Why getText() in JPasswordField was deprecated?
body: <p>I never thought before, only I used the method <code>getPassword</code> that returning an array of characters and I had seen the <code>getText</code> method was <strong>deprecated</strong>. But now that I think, why this method was <strong>deprecated</strong>?.</p>
  
  <p>The Java documentation explains:</p>
  
  <blockquote>
    <p><strong>Deprecated</strong>. <em>As of Java 2 platform v1.2, replaced by <code>getPassword</code>.</em></p>
    
    <p>Fetches a portion of the text represented by the component. Returns an
    empty string if length is 0. </p>
    
    <p>For security reasons, this method is
    deprecated. Use the <code>getPassword</code> method instead.</p>
  </blockquote>
  
  <p>But what are those <strong><em>security reasons</em></strong>? Any ideas about this?</p>
  
  <p>Thank you in advance.</p>