Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@alhazmy13
Created July 11, 2016 12:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save alhazmy13/52ace6c77b12f2fc21d617fad4358a69 to your computer and use it in GitHub Desktop.
Save alhazmy13/52ace6c77b12f2fc21d617fad4358a69 to your computer and use it in GitHub Desktop.
/**
* 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