title: Parent/Child Constructor in java
body: <p>I keep getting this error required:boolean; found:no arguments; reason:actual and formal arguments lists differ in length;</p>
  
  <p>I know why this is, because my constructor in my superclass and subclass don't match...but i dont want to make changes to them if possible because it'll ruin the rest of my other classes and if i do need to make changes i'd rather just make changes to the LowRights class. Could someone point me in the right direction?</p>
  
  <pre><code>public class LowRights extends SecurityRights
  {
      private String name;
  
      public LowRights(String n){
          this.name = n;
          boolean right = getRight(); // Added
          setRight(false); // Added
      }
  
      public boolean setRight(boolean right){
          return right;
      }
  
      public String getName(){
          return name;
      }
  
      public static void main(String[] a){
      LowRights s= new LowRights("Lisa");
      System.out.print(s.getName() +" "+s.getSecret());                
    }
  
  }
  </code></pre>
  
  <p>This is my super class:</p>
  
  <pre><code>public class SecurityRights
  {
  private boolean right;
  private boolean canreadSecret;
  String SECRET="the secret is 42";
  
  
  
  public SecurityRights(boolean r)
  {
   r = right;
   if (r) canreadSecret=true; else canreadSecret=false;
  }
  
  boolean getRight(){
   return right;
  }
  
  boolean canReadSecret(){
   return canreadSecret;
  }
  
  String getSecret(){
   if (canreadSecret) return SECRET; else return "access denied";
  }
  
  }
  </code></pre>