title: char cannot be dereferenced JAVA
body: <p>Here is my code</p>
  
  <pre><code>import java.util.Scanner;
  public class prog3{
    public static void main(String[] args){
    Scanner input = new Scanner(System.in);
      char a1 = input.nextLine().charAt(0);
      char a = Character.toUpperCase(a1);
      String b = input.nextLine();
      int size= b.length();
      char [] arr =b.toCharArray() ;
      for (int i=0;i&lt;size;i++){
        char temp = Character.toUpperCase(arr[i]);
     if(a==temp){
      arr[i]=arr[i].replace(a,i); // here i am facing error
       System.out.print(arr[i]);
       }
  
  
      }
  
    }
  
  }
  </code></pre>
  
  <p>i am facing an error at line14</p>
  
  <blockquote>
    <p>Line:14: char cannot be dereferenced</p>
  </blockquote>
  
  <p>how do i solve this</p>