title: I want to use enhanced for loop, take input from user and find the element in the array, Why is this program not running accordingly?
body: <pre><code>public class control {
      public static void main(String[] args) throws java.io.IOException {
  
          int num[] = {1,2,3,4,5,6,7,8,9};
          char choice;
  
          System.out.println("Enter your number in the array: ");
          choice = (char) System.in.read();
          for(int x: num) {
              if(x==choice)
              {
                  System.out.println("Found");
                  break;
              }
              else
                  System.out.println("Not found");
          }
      }
  }
  </code></pre>