Skip to content

Instantly share code, notes, and snippets.

@ekumachidi
Created September 24, 2015 23:02
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 ekumachidi/ebdb4d2f1a764adc5538 to your computer and use it in GitHub Desktop.
Save ekumachidi/ebdb4d2f1a764adc5538 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