Question: how to calculate time difference in milliseconds in java?
Answer: parse(time2); long difference = date2. getTime() - date1. getTime(); Difference is in milliseconds.