title: Java & SQL comparing dates
body: <p>I am trying to get client arrival date and compare it with my SQL database to see if in my data base the same date exists. however i receive the following error: <code>The operator &gt; is undefined for the argument type(s) java.lang.String, java.lang.String</code></p>
  
  <p>P.S I need to compare it via java not using sql query</p>
  
  <pre><code>public void makeNewReservation() throws ParseException {
      // Enter informations
  
      System.out.println("Date of arrivel?");
      Scanner in = new Scanner(System.in);
      String date_entree = in.next();
      System.out.println("Date of exit? dd/MM/yyyy");
      String date_sortiee = in.next();
      calculateDaysDifference(date_sortiee, date_entree);
  
  
  
  public  void calculateDaysDifference(String date_entree, String date_sortiee) throws ParseException{
  
  
  ConnectionMySQL myConnection=new ConnectionMySQL();
      Connection conSQL=myConnection.startDBConnection();
      boolean connectionOK=myConnection.checkConnection(conSQL);
  
      String query = ("SELECT `START_DATE`,`END_DATE` FROM `room_booking");
  
  
      //if everything is fine with the connection, i try to execute a query
      if (connectionOK){
          try{
              ResultSet mesResultats=myConnection.executeQuery(conSQL, query);
  
              //the while loop is just for me to check the dates
              while (mesResultats.next()) {
                  System.out.println("START_DATE: "+mesResultats.getString(1)+" END_DATE : "+ mesResultats.getString(2));
  
  
                  if (date_entree &gt; mesResultats.getString(1){
                      System.out.println("cant reserve room room reserved already");
  
  
                  }
              }
  
  
              // je ferme la connexion
              conSQL.close();
  
          }
  
          catch(SQLException e){
              e.printStackTrace();
  
  
          }
  
      }
  </code></pre>
  
  <p><a href="http://i.stack.imgur.com/vZiYQ.jpg" rel="noreferrer">my data base</a></p>