title: Compiler error - Can not find symbol
body: <p>this is my code</p>
  
  <pre><code>public class RegMember {
  
      private int regno;
      private Cmember cmember;
      private Vipmember vipmember;
      private Clubs clubs;
      private static int nextNo =1000;
  
  
  public RegMember(Cmember cmember,Vipmember vipmember,Clubs clubs) {
  
      this.vipmember=vipmember;
      this.cmember=cmember;
      this.clubs=clubs;
      regno=++nextNo;
  }
  public static int getNextNo(){
      return nextNo;
  }
  
  public String toString(){
      return String.format("%-6d%-25s%-40s",regno,vipmember,cmember,clubs);
  }
  </code></pre>
  
  <p>}</p>
  
  <p>This is the <strong>main class</strong></p>
  
  <pre><code>import java.util.Scanner;
  public class TestPerson {
  
  /**
   * Creates a new instance of &lt;code&gt;TestPerson&lt;/code&gt;.
   */
  public TestPerson() {
  }
  
  /**
   * @param args the command line arguments
   */
  public static void main(String[] args) {
      // TODO code application logic here
  
      MemberType[] m = { new MemberType("Corporate Member"),new MemberType("VIP Member")
      };
      RegMember[] r = new RegMember[2];
      Cmember cm;
      Vipmember vip;
      Scanner s = new Scanner(System.in);
      for(int i=0;i&lt;r.length;i++){
  
          System.out.println("your reg no is :"+(RegMember.getNextNo()+1));
          for(int a=0;a&lt;m.length;a++){
              System.out.println((a+1)+". "+m[a].toString());
          }
          System.out.println("Enter Your selection:");
          int sel=s.nextInt();
          if(sel==1){
              s.nextLine(); 
              System.out.println(" enter name:");
                  String Name=s.nextLine();
              System.out.println(" enter Handphone:");
                  String Hpnum=s.next();
              System.out.println(" enter Age:");
                  int age=s.nextInt();
              System.out.println("enter Company Name:");
                  String CompanyName=s.nextLine();
              cm = new Cmember(Name,Hpnum,age,CompanyName);   
          }
          else{
              s.nextLine();
              System.out.println(" enter name:");
                  String Name=s.nextLine();
              System.out.println(" enter Handphone:");
                  String Hpnum=s.next();
              System.out.println(" enter Age:");
                  int age=s.nextInt();
              System.out.println("enter Email:");
                  String email=s.next();
              vip = new Vipmember(Name,Hpnum,age,email);
          }
          if(sel==1){
              r[i]=new RegMember(cm);
  
          }
          else{
              r[i]=new RegMember(vip);
          }
          s.nextLine(); 
      }
  
          displayInfor(r);
  }
  public static void displayInfor( RegMember[]r){
  
  for(int i =0; i&lt;r.length;i++)
  System.out.println( r[i].toString());
  }
  </code></pre>
  
  <p>}</p>
  
  <p>This is the problem i facing..</p>
  
  <p><code>error: constructor</code> 
  RegMember in class RegMember cannot be applied to given types;</p>
  
  <pre><code>            r[i]=new RegMember(cm);
  
                   ^
  </code></pre>
  
  <p>required: Cmember,Vipmember,Clubs</p>
  
  <p>found: Cmember</p>
  
  <p>reason: actual and formal argument lists differ in length</p>
  
  <p><code>error: constructor</code> 
  RegMember in class RegMember cannot be applied to given types;</p>
  
  <pre><code>            r[i]=new RegMember(vip);
  
                   ^
  </code></pre>
  
  <p>required: Cmember,Vipmember,Clubs</p>
  
  <p>found: Vipmember</p>
  
  <p>reason: actual and formal argument lists differ in length</p>
  
  <p>2 errors</p>