That depends on how you define the number of months between two dates. In the example you provide 1, 2 and 3 are all valid answers, according to different definitions. Which one do you use?
The SimpleDateFormat class helps with converting dates into string and vice versa; it does not perform any date calculations.
I'm gonna teach you a lesson! Start by looking at this tiny ad: