title: Java cannot find symbol for any Arrays?
body: <p>So, It's so annoying. </p>
  
  <p>I made 2 programs.</p>
  
  <p>Number #1 :</p>
  
  <pre><code>class Arrays2 {
  public static void main(String[] args){
  
      String sentenceBest[] = {"This is the first sentence!"};
  
      char chR[] = sentenceBest.toCharArray();        
  
      for (int counter = 0; counter &lt; chR.length; counter++){
          char now = chR[counter];
          if (now != ' ') {
              System.out.println(now);
          }else {
              System.out.println('.');
          }
      }
  
  
  
  }
    }
  </code></pre>
  
  <p>And for this program it says: </p>
  
  <pre><code>Arrays_ToCjarArray(not working).java:6: cannot find symbol
  symbol  : method toCharArray()
  location: class java.lang.String[]
  char chR[] = sentenceBest.toCharArray();        
                               ^
   1 error
  </code></pre>
  
  <p>Number #2 Program:</p>
  
  <pre><code>class Arrays_3 {
  public static void main(String[] args){
  
      boolean numbers[] [] = new boolean[10] [10];
  
      numbers[9] [8] = true;
  
      System.out.println(numbers[9][8] + "!!!");
  
  
      String names[] = {"Marton", "Balint", "Thomas", "David", "John", "Peter", "Andy", "Daniel", "Josh", "James", "Erling", "Romeo", "Vincent", "Fabian"};
  
      System.out.println("The origional order: ");
      for (int counter = 0; counter &lt; names.length; counter++){
          String newName = names[counter];
          System.out.println(counter + ": " + newName);
      }
  
  
      System.out.println("The Alphabetical order: ");
  
      Arrays
  
      for (int counter2 = 0; counter2 &lt; names.length; counter2++) {
          System.out.println(counter2 + ": " + names);
      }
  
  
  }
         }
  </code></pre>
  
  <p>And the same thing. Cannot find Symbol. Sooo annoying.</p>
  
  <pre><code>Arrays_3.java:21: cannot find symbol
  symbol  : variable Arrays
  location: class Arrays_3
  Arrays.sort(names);
      ^
  1 error
  </code></pre>
  
  <p>I really don't understand this because this source code was from a great(so far) book called Sams teach you Java in 24 hours. So I really don't understand this. Any help would be apreciated well.</p>