title: How would one create a method that has parameters of a char array and a char that finds a specific character in the array and returns the index
body: <pre><code>import java.io.*;
  import java.math.*;
  import java.security.*;
  import java.text.*;
  import java.util.*;
  import java.util.concurrent.*;
  import java.util.regex.*;
  
  
  class Result {
  
  /*
   * Complete the 'search' function below.
   *
   * The function is expected to return an INTEGER.
   * The function accepts following parameters:
   *  1. CHARACTER_ARRAY myList
   *  2. CHARACTER letter
   */
  
  public static int search(char[] myList, char letter) {
  
       for(int i = 0; i &lt; myList.length; i++){
          if(myList[i] == (letter)){
     
   }
  
  
  
   }
   return....
  
  }
  }
  </code></pre>
  <p>How would I approach this question not understanding how you would find a specific char in an array of chars....What would I return so that If the char isn't found it returns -1.</p>
  <p>What would one input to the array and char parameter?</p>