Skip to content

Instantly share code, notes, and snippets.

@devindianushika
Last active October 2, 2019 23:08
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 devindianushika/afd2686f68bd84608d8728f4ed291940 to your computer and use it in GitHub Desktop.
Save devindianushika/afd2686f68bd84608d8728f4ed291940 to your computer and use it in GitHub Desktop.
package com.poly.overloading;
public class NewCircle {
public void draw(){
System.out.println("circle with default color Black and diameter 1 cm.");
}
public void draw(int diameter){
System.out.println("circle with default color Black and diameter"+diameter+"cm.");
}
public void draw(int diameter, String color){
System.out.println("circle with color"+color+" and diameter"+diameter+" cm.");
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment