Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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