Last active
December 10, 2015 00:28
-
-
Save j0ni/4351082 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class One { | |
protected String arg; | |
public One(String arg) { | |
this.arg = arg; | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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