title: How to use the Comparator method in my project
body: <p>I am creating an issue tracker in Java.I have an issue class as follows:</p>
  <pre><code>import java.util.Date;
  public class Issue {
  
      int IssueNo;
      String IssueTitle;
      String text;
      Date TimeStamp=new Date();
      String Creator;
      String Assignee;
      String tag;
      int priority;
      String status;
  
  }
  </code></pre>
  <p>My program has to display the issues based on either the priority(a number from 1 to 9) or TimeStamp(date on which issue is created).I want to know how to use priority queue and comparator to display the issues</p>