Skip to content

Instantly share code, notes, and snippets.

@udacityandroid
Last active October 1, 2021 05:47
Show Gist options
  • Star 28 You must be signed in to star a gist
  • Fork 19 You must be signed in to fork a gist
  • Save udacityandroid/797532fc79eed21d801e to your computer and use it in GitHub Desktop.
Save udacityandroid/797532fc79eed21d801e to your computer and use it in GitHub Desktop.
Android Development for Beginners : Cola Wars Example
public class MainActivity extends AppCompatActivity {
...
public void voteUdacicola(View view) {
int udacicolaVotes = 0;
udacicolaVotes = udacicolaVotes + 1;
}
public void votePepcity(View view) {
int pepcityVotes;
pepcityVotes = pepcityVotes + 1;
}
public void showMeVotes(View view) {
display(udacicolaVotes + " vs. " + pepcityVotes);
}
...
}
@sudhir72350999
Copy link

very nice course

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