title: Java String Limit
body: <p>I am new to java (previously only worked with sql) and I am attempting to set a length limit for my string variable. Basically I have a username field that can only be 6 characters long.  </p>
  
  <p>I am trying the following:</p>
  
  <pre><code>private String username (6);
  </code></pre>
  
  <p>I am assuming this is not the correct format. Does anyone know how i can do this in java correctly? </p>