Skip to content

Instantly share code, notes, and snippets.

View MuhammadSugiharto's full-sized avatar

MuhammadSugiharto

View GitHub Profile
@udacityandroid
udacityandroid / Code snippet in InboxActivity.java
Last active February 6, 2023 13:53
Android for Beginners : If/Else Email Quiz
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.";