Actual and formal length error in both classes
<p>I'm doing this project for school.</p>

<p>Basically you enter any phrases and the program break it down into the number of specific letters into an array and the most occurring letter.</p>

<p>ex. </p>

<blockquote>
  <p>I am not Santa </p>
  
  <p>Santa lives in the north pole </p>
  
  <p>Santa is not Canadian</p>
  
  <p>a=10</p>
  
  <p>b=0</p>
  
  <p>c=1</p>
</blockquote>

<p>and so on, plus</p>

<blockquote>
  <p>most occuring=a</p>
</blockquote>

<p>This is my Main:</p>

<pre><code>import java.util.Scanner;
public class LetterDriver{
  public static void main(String[] args){
    String[] lines = new String[3];
    Scanner scan = new Scanner(System.in);
    System.out.println("enter any phrases, then press enter");
    int pos = 0;
    String tScan = " ";
    while(tScan.length() &gt; 0){
      tScan = scan.nextLine();
      lines[pos] = tScan;
      pos++;
    }
    LetterProfile.printResults(tScan);//ERROR, I feel it's a syntax issue here, but I can't figure it out.
  }
}
</code></pre>

<p>and this is my other class:</p>

<pre><code>public class LetterProfile{

  int cCount[] = new int [26];

  public void countChars (String s){
    s.toLowerCase();
    char a = 'a';
    for (int i =0;i &lt; s.length();i++){
      int pos = (int)s.charAt(i) -(int) a;
      if ( pos &gt;=0 &amp;&amp; pos &lt; 26){
        cCount[pos]++;
      }
    }
  }
  public int mostOccur(){
    int largest = 0;
    int largestindex = 0;
    for(int a = 0; a &lt; 26; a++){
      if(cCount[a] &gt; largest){
        largest = cCount[a];
      }
    }
    return (largestindex);
  }
  public void printResults(){
    System.out.println(this.mostOccur());
  }
  public void runProg(String a){
    a.countChars();
    System.out.println(mostOccur(a));  //ERROR
  }
}   
</code></pre>

<p>I've being working on this for about 5 hours, and I can't find anything wrong with it. I think all the parts I would need for the program is in there already, but I just need to organize it better.</p>

<p>it's giving me these errors:</p>

<pre><code>2 errors found:
File: C:\Users\Mike\Desktop\LetterDriver.java  [line: 14]
Error: method printResults in class LetterProfile cannot be applied to given types;
  required: no arguments
  found: java.lang.String
  reason: actual and formal argument lists differ in length

File: C:\Users\Mike\Desktop\LetterProfile.java  [line: 30]
Error: method mostOccur in class LetterProfile cannot be applied to given types;
  required: no arguments
  found: java.lang.String
  reason: actual and formal argument lists differ in length
</code></pre>
