Skip to content

Instantly share code, notes, and snippets.

@dcow
Created March 12, 2014 06:31
Show Gist options
  • Save dcow/9501913 to your computer and use it in GitHub Desktop.
Save dcow/9501913 to your computer and use it in GitHub Desktop.
Overload constructor example, Java.
public class OverloadedConstructor {
String value;
public OverloadedConstructor(int value) {
this.value = Integer.toString(value);
}
public OverloadedConstructor(String value) {
this.value = value;
}
// ...
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment