title: How to check a timeperiod is overlapping another time period in java
body: <p>How to check a time period is overlapping another time period in the same day.</p>
  
  <p>For example,</p>
  
  <ol>
  <li>7:00AM to 10:30AM is overlapping 10:00AM to 11:30AM</li>
  <li>7:00AM to 10:30AM is overlapping 8:00AM to 9:00AM</li>
  <li>7:00AM to 10:30AM is overlapping 5:00AM to 8:00AM</li>
  </ol>