title: How can I divide a range into n equal bins?
body: <p>I have  a  range <em>[min-max]</em>. <em>min</em> and <em>max</em> are of type <code>double</code>. I want to divide this interval into n equal intervals.(n is an integer). How can I achieve this in Java?  </p>
  
  <p>For example :
  say I have a range <code>[10-50]</code>. and <code>n=4</code> .
  output should be a list of ranges like <code>[10-20] [20-30][30-40] [40-50]</code> </p>