Last active
October 2, 2019 23:08
-
-
Save devindianushika/afd2686f68bd84608d8728f4ed291940 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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