Created
March 21, 2018 10:07
-
-
Save sapanparikh18/42a914dd54edc262f29144b253925059 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 1. | |
int years = getYears(getDateOfBirth()); | |
int months = getMonths(getDateOfBirth()); | |
System.out.println("The age of the person is" + years + "years and "+months+" months"); | |
// 2. | |
Date dob = getDateOfBirth(); | |
int years = getYears(dob); | |
int months = getMonths(dob); | |
System.out.println("The age of the person is" + years + "years and "+months+" months"); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment