title: print"we don't found this letter" java with loop
body: <p>this my program </p>
  
  <pre><code>import java.util.*;
  public class LeTter { //open class name
      static Scanner keyboard = new Scanner(System.in); // Scanner
      public static void main(String[] args) { //open main class
          char letter; //decl
          int y, x, z; //decl
          boolean check = false;
          System.out.println("Enter 8 letters: "); // print sentince
          char[] des = new char[8]; //array
          for (y = 0; y &lt; des.length; y++) { // for without semicolon :), open for loop
              des[y] = keyboard.next().charAt(0); //initialize
          } // close for loop
          System.out.println("Enter any letter to check about it: "); //will apper to the user
          letter = keyboard.next().charAt(0); //initi
          for (x = 0; x &lt; des.length; x++) { //for loop opens
              if (des[x] == letter) { //open if loop
                  System.out.println("we found it's " + des[x] + " and the index of it is " + x);
                  System.out.println("so we will show you this letters " + x + " times");
                  for (z = 0; z &lt; x; z++)
                      System.out.println(des[x] + "  ");
                  check = false;
              } //close if loop
              if (true)
                  System.out.println("are you sure about the letter's you enterd it? we didnt found it ");
          } // close for loop
      } //close main
  } //close class
  </code></pre>
  
  <p>put if the user didn't put the letter that not look like 8 letter was enter i want to print this statement "we don't found it"
  how can I do it</p>
  
  <p><strong>example:
  enter 8 letters
  a s d f g h j k 
  enter any letter 
  t
  we don't found it</strong>  &lt;&lt; how can I do this??</p>
  
  <p><strong>another example:
  enter 8 letters
  a s d f g h j k 
  enter any letter 
  a
  we found it</strong>  &lt;&lt; i did this , i want the first one ""onlly""</p>