Created
July 11, 2016 12:11
-
-
Save alhazmy13/52ace6c77b12f2fc21d617fad4358a69 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
/** | |
* Created by Alhazmy13 on 7/11/16. | |
*/ | |
public class Test { | |
int arg1,arg2,arg3; | |
public Test() { | |
// A no arguments constructor that sends default values to the largest | |
this(1,2,3); | |
} | |
public Test(int arg1, int arg2) { | |
// An example of a partial constructor that uses the passed in arguments | |
// and sends a hidden default value to the largest | |
this(arg1,arg2, 3); | |
} | |
// Largest constructor that does the work | |
public Test(int arg1, int arg2, int arg3) { | |
this.arg1 = arg1; | |
this.arg2 = arg2; | |
this.arg3 = arg3; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment