Skip to content

Instantly share code, notes, and snippets.

@sidishere
Created December 24, 2019 11:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sidishere/d4df65cd178a609d50a46cbc5d5d81e4 to your computer and use it in GitHub Desktop.
Save sidishere/d4df65cd178a609d50a46cbc5d5d81e4 to your computer and use it in GitHub Desktop.
if (((nameField.getText().toString().trim().length())==0))
    message.setText("Tell me your name");
else if(dobField.getText().toString().length()==0)
    message.setText("Hello "+nameField.getText().toString()+". Plz tell me your birthday");
else
message.setText(("Hey " + nameField.getText().toString() + ". You know " + monthsArray[Integer.parseInt(dobField.getText().toString().substring(3, 5)) - 1] +
            " is a really good month to start your journey on our planet."));
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment