Date and Time compare in Java

I need to compare 2 timestamps which the received timestamp is within 10min of the current timestamp. Note that the revTimeStamp will come in a form of String.

String revTimeStamp = new Date().toString();
String currentTimeStamp = new Date().toString();

//compare how???

Solution: Date and Time compare in Java

its a little unclear what you want to achieve here.
I am going to assume the following (if i am wrong you will have to extrapolate):
current date is now
received date is some past date.

if((currentDate.getTime() - receivedDate.getTime()) <= 10 * 60 * 1000)
{
   //the current date is equal to or less than 10 mins after received date
}else{
// current date is more that 10 mins after recieved date.
}