In Java, I want to calculate the number of days between two dates as Date type.
Well to start with, you should only deal with them as strings when you have to. Most of the time you should work with them in a data type which actually describes the data you're working with. I would recommend that you use Joda Time, which is a much better API than Date/Calendar. It sounds like you should use theDays type in this case. You can then use:
* Joda Online API
* Calculating the difference between two Java date instances