Last active
December 25, 2015 02:59
-
-
Save error454/6906759 to your computer and use it in GitHub Desktop.
Birthday Code
This file contains hidden or 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
public String doTheMagic(String person, int age){ | |
int randomNumber = 2; | |
age *= randomNumber; | |
if(person = null){ | |
person = "Horrible Person"; | |
} | |
boolean isTheirBirthday = true; | |
String itsYourBirthday = "Happy Birthday " + person + "! You don't look a day over " + age + "!"; | |
String itsNotYourBirthday = "The cake is not a lie, but you don't get any anyways"; | |
return isTheirBirthday ? itsYourBirthday : itsNotYourBirthday; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment