Skip to content

Instantly share code, notes, and snippets.

@alhazmy13 alhazmy13/Test.java
Created Jul 11, 2016

Embed
What would you like to do?
/**
* 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
You can’t perform that action at this time.