Advertisement
Guest User

Untitled

a guest
Jul 23rd, 2019
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.71 KB | None | 0 0
  1. package com.example.android.cricketcount;
  2.  
  3. import androidx.appcompat.app.AppCompatActivity;
  4. import android.os.Bundle;
  5. import android.view.View;
  6. import android.widget.TextView;
  7.  
  8. import java.lang.Object;
  9.  
  10. public class MainActivity extends AppCompatActivity {
  11.  
  12. @Override
  13. protected void onCreate(Bundle savedInstanceState) {
  14. super.onCreate(savedInstanceState);
  15. setContentView(R.layout.activity_main);
  16. int scoreTeamA = 0;
  17. int scoreTeamB = 0;
  18.  
  19.  
  20. public void add6(View){
  21. scoreTeamA = scoreTeamA + 6:
  22. display(scoreTeamA);
  23. }
  24.  
  25. public void add4(View){
  26. scoreTeamA = scoreTeamA + 4:
  27. display(scoreTeamA);
  28. }
  29. }
  30. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement