title: Find largest letter that occurs in upper and lowercase
body: <p>I am attempting to write a program that finds the largest letter in a string that occurs in upper and lowercase. Here is what I have so far but am getting an error: Solution.java:19: error: incompatible types: boolean cannot be converted to boolean[]
  Heres my code:</p>
  <pre><code>public String solution(String S) {
      boolean[] upperC = new boolean[26];
      boolean[] lowerC = new boolean[26];
  
      char[] arr = S.toCharArray();
      
      for(char c : arr) {
          if(Character.isLowerCase(c))
              lowerC = true;
  
          if(Character.isUpperCase(c))
              upperC = true;
      }
  
      for(int i = 25; i&gt;= 0; i--){
          if(upperC[i] &amp;&amp; lowerC[i]){
              return(char)(i + 'A') + &quot;&quot;;
          }
      }
  
      return &quot;NO&quot;;
  }
  </code></pre>