title: Can't change Char
body: <p>When I'm trying to change char in my word when I click on for example button A. I want a set char on A and change in my invisible word from (--) set A there where is his position. I'm generating code in NetBeans.</p>
  
  <pre><code>if(hadanka.contains(pismeno))
  {
      for(int i=0;i!=hadanka.length();i++)
      if(pismeno.equals(Character.toString(hadanka.charAt(i))))
      {
          prepsani[i]=hadanka.charAt(i);
  
      }
  
      System.out.println(prepsani);;
  }
  </code></pre>
  
  <p>Everything is ok. Hadanka is a guessing word and pismeno is the letter that I chose.
  When I use it in my application for Android errors occur.</p>
  
  <p>Here is my Android code: </p>
  
  <pre><code>char zvolenePismeno;
  public void OnStart (View v)
  
  {
      if(odpoved.contains(zvolenePismeno))
      {
          for(int i=0;i!=odpoved.length();i++)
          if(zvolenePismeno.equals(Character.toString(odpoved.charAt(i))))
          {
              prepsani[i]=odpoved.charAt(i);
  
          }
          labOdpoved.setText(String.valueOf(prepsani));
      }
  
  }
  
  public void OnA(View v)
  {
      zvolenePismeno = 'A';
      kliknuti(btn_A);
  }
  </code></pre>
  
  <p>The errors I get is the following:</p>
  
  <blockquote>
    <p>the method contains(charsequence) in the type string is not applicable
    for the arguments (char)</p>
  </blockquote>
  
  <p>at the line <code>if(odpoved.contains(zvolenePismeno))</code> and</p>
  
  <blockquote>
    <p>cannot invoke equals (String) on the primitive type char</p>
  </blockquote>
  
  <p>at the line <code>if(zvolenePismeno.equals(Character.toString(odpoved.charAt(i))))</code>.</p>
  
  <h2>UPDATE 1</h2>
  
  <p>it is doesn't work :/ Im change my code on </p>
  
  <pre><code> if(odpoved!=null)
           {
                 for(int i=0;i!=odpoved.length();i++)
                      if(zvolenePismeno==odpoved.charAt(i))
                        {
                             prepsani[i]=odpoved.charAt(i);
  
                        } 
                 labOdpoved.setText(String.valueOf(prepsani));
           }
  </code></pre>
  
  <p>Here is my whole code (with error )¨</p>
  
  <pre><code>public class MainActivity extends Activity implements OnClickListener {
      int lvl1;
      String[] Level1 = {"APPLE", "SAMSUNG", "NOKIA", "HTC"};
      String odpoved, pokus;
      char zvolenePismeno;
  
      public void OnStart(View v) {
          btnStart = (Button) findViewById(R.id.btnStart);
          labOdpoved = (TextView) findViewById(R.id.labOdpoved);
          Random rand = new Random();
          lvl1 = Math.abs(rand.nextInt() % 3);
          odpoved = Level1[lvl1];
  
          char[] prepsani = new char[odpoved.length()];
          for (int i = 0; i != odpoved.length(); i++) {
              prepsani[i] = '-';
          }
          labOdpoved.setText(String.valueOf(prepsani));
          if (odpoved.contains(zvolenePismeno)) {
              for (int i = 0; i != odpoved.length(); i++)
                  if (zvolenePismeno.equals(Character.toString(odpoved.charAt(i)))) {
                      prepsani[i] = odpoved.charAt(i);
                  }
              labOdpoved.setText(String.valueOf(prepsani));
          }
      }
  
      public void kliknuti(Button btn) {
          btn.setClickable(false);
          btn.setVisibility(View.INVISIBLE);
      }
  
      public void OnA(View v) {
          zvolenePismeno = 'A';
          btn_A = (Button) findViewById(R.id.btn_A);
          kliknuti(btn_A);
      }
  }
  </code></pre>