Created
November 22, 2016 12:52
-
-
Save daveRanjan/9b70d4697f009c54ee5a386a83ca9845 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
public class Circle extends Shape { | |
private Double radius = 5.0; | |
// See this annotation @Override, it is telling that this method is from parent | |
// class Shape and is overridden here | |
@Override | |
public Double area(){ | |
return 3.14 * radius * radius; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment