Skip to content

Instantly share code, notes, and snippets.

@j0ni
Last active December 10, 2015 00:28
Show Gist options
  • Save j0ni/4351082 to your computer and use it in GitHub Desktop.
Save j0ni/4351082 to your computer and use it in GitHub Desktop.
1:41:28 naga% javac *.java
Two.java:1: error: constructor One in class One cannot be applied to given types;
public class Two extends One {
^
required: String
found: no arguments
reason: actual and formal argument lists differ in length
1 error
[1] 74242 exit 1 javac *.java
public class One {
protected String arg;
public One(String arg) {
this.arg = arg;
}
}
public class Two extends One {
public void print() {
System.out.println(this.arg);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment