Given the following code:

              for (int i=0; i < values.length; i++) {
                if (values[i] == searchedValue){
                  found = true; 
                } else {
                  found = false;
                }
              } 
              if (found) { 
                System.out.println("found " + searchedValue); 
              } else { 
                System.out.println ("not found"); 
              }      
          
If the initital values are:
            int[] values = { 3, 6, 10, 12, 100, 200, 250, 500 };
            int searchedValue = 10;
            boolean found = false;
        
What is output?

not found
  • found 10

There are no hints for this question