Skip to content

Instantly share code, notes, and snippets.

@Chiamaka
Last active September 24, 2015 12:51
Show Gist options
  • Save Chiamaka/f643c17b9cf687fe01ad to your computer and use it in GitHub Desktop.
Save Chiamaka/f643c17b9cf687fe01ad to your computer and use it in GitHub Desktop.
//class Example to illustrate polymorphism with the + sign
class Example{
public void add(int a, int b){
System.out.println(a + b);
}
public void addStatement(int a, int b){
System.out.println("The sum of a and b is: " + (a+b));
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment