Skip to content

Completed Practices#10

Open
xavierb117 wants to merge 7 commits intogrc-cohort-21:mainfrom
xavierb117:main
Open

Completed Practices#10
xavierb117 wants to merge 7 commits intogrc-cohort-21:mainfrom
xavierb117:main

Conversation

@xavierb117
Copy link
Copy Markdown

No description provided.

Copy link
Copy Markdown

@auberonedu auberonedu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice job!

Comment thread src/Person.java
Comment on lines +38 to +41
public int birthYear(int currentYear) {
int birthYear = currentYear - personAge;
return birthYear;
}
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This works great! We could also consider doing it all on one line:
return currentYear - personAge;

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants