title: Android Studio - Array, ArrayList, List - JAVA
body: <p>I am making a guessing game for as my School project, but I am quite new to Android Studio and Java.</p>
  
  <p>At the moment my code looks like this:</p>
  
  <pre><code>public class MainActivity extends AppCompatActivity {
  
      public int score = 0;
      int random = random();
      @Override
      protected void onCreate(Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);
          setContentView(R.layout.activity_main);
          Button correct = (Button) findViewById(R.id.correct);
          Button other = (Button) findViewById(R.id.other);
          Button newGame = (Button) findViewById(R.id.newGame);
          TextView words = (TextView) findViewById(R.id.words);
  
  
      }
  
      public Integer random (){
          int random = (int )(Math.random() * 5);
          return random;
      }
  
      private String list[] =
              {"Dog", "Cat", "Mouse", "Elephant", "Rat", "Parrot"};
  
      public void clickedButton(View view) {
          TextView words = (TextView) findViewById(R.id.words);
          if (view.getId()== R.id.newGame)
          {
              words.setText(list[random]);
              score = 0;
              Log.i("score", "score = " + score);
          }
          if (view.getId() == R.id.correct)
          {
              // set maybe new array so new textview does not give the same value
              words.setText(list[random]);
              score = score +1;
              Log.i("score", "score = " + score);
          }
          if (view.getId() == R.id.other)
          {
              // set maybe new array so new textview does not give the same value
              words.setText(list[random]);
              Log.i("score", "score = " + score);
          }
  
      }
  </code></pre>
  
  <p>}</p>
  
  <p>Idea is simple. I have my array with (at the moment) 6 words in it. So as I launch the game it gives me a random word on screen which I have to describe to others. If they guess it right I press correct, I get another word, if not I can pass and get another word... Well the problem I see is that there is chance that I get the same word over again. So I thought there should be a way how to fix this problem.</p>
  
  <p>I thought about adding like if statements like if index 1 or 2 or 3 then give another word but if I had 100 words it would be monkey work to do it.</p>
  
  <p>So I think there should be a chance how I can delete words from like temp. array, but there is no in-built method to do it. </p>
  
  <p>I was reading that there are those arrayLists and lists but would not it be easier to use Array? and maybe some tips how to?</p>