title: Android Java Strings
body: <p>For Strings..</p>
  
  <p>How can i Detect if the string "name" has the text "Hello" a toast will come up saying yes but if it doesn't a toast will come up saying no?
  my code:</p>
  
  <pre><code>        String ft;
      if(ft.contains("Hello")){
  
          Toast.makeText(main.this ,"Yes", Toast.LENGTH_SHORT).show();
          }
          else{
          Toast.makeText(main.this ,"No", Toast.LENGTH_SHORT).show();
          }
  </code></pre>
  
  <p>I get a error at ft on if(ft.contains("Hello")) {</p>
  
  <p>"The local variable ft may not have been initialized"</p>