title: implementing hashing with random access files java
body: <p>I am implementing hashing with random access files in java to treat collisions. I need to use a method to generate the keys according to a name to try to minimize collisions. With the method that I have, if income 100 records, I generated 95 collisions.</p>
  
  <p>Note that the hash method I use is that of division or modulo the input data string is of length 6.</p>
  
  <p>Are there possible improvements to this method, or alternatives?</p>
  
  <pre><code>public int hashCode(String nombre )  {
      int hash = 1;
      hash =  hash*31 + nombre.hashCode();
      System.out.println("hsh " +hash);
      return Math.abs(hash);
  }
  </code></pre>