Forked from udacityandroid/Code snippet in InboxActivity.java
Created
February 11, 2018 21:36
-
-
Save ehab18/e54fc968cfb9775c29f77192c7c8fa5d to your computer and use it in GitHub Desktop.
Android for Beginners : If/Else Email Quiz
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
int numberOfEmailsInInbox = 0; | |
int numberOfDraftEmails = 2; | |
String emailMessage = "You have " + numberOfEmailsInInbox + " emails. "; | |
String draftMessage = "You have " + numberOfDraftEmails + " email drafts."; | |
if (numberOfEmailsInInbox == 0) { | |
emailMessage = "You have no new messages. "; | |
} | |
if (numberOfDraftEmails == 0) { | |
draftMessage = "You have no new drafts."; | |
} | |
Log.v("InboxActivity", emailMessage); | |
Log.v("InboxActivity", draftMessage); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment