title: Java: Char Array not working
body: <pre><code>import javax.swing.JOptionPane;
  
  public class testARRAY
  {
     public static void main(String[] args)
     {
        char[] charArray;
  
        //creating the method
        charArray = getCharArray();
        System.out.println(charArray);
     }
  
        public static char[] getCharArray()
        {
           char array = {"A", "B", "C", "D"};
  
           return array;
        }
  }
  </code></pre>
  
  <p>here is the output error</p>
  
  <pre><code>testARRAY.java:16: error: illegal initializer for char
           char array = {"A", "B", "C", "D"};
                        ^
  testARRAY.java:18: error: incompatible types: char cannot be converted to char[]
           return array;
                  ^
  2 errors
  </code></pre>
  
  <p>I'm just trying to practice Java. I'm not an advanced programmer, so please explain to me with details.</p>