Created
November 22, 2016 12:53
-
-
Save daveRanjan/d3bbe5c6dd9d60ffb33d6bb5e576c5cf 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 Rectangle extends Shape { | |
private Double length = 5.0; | |
private Double breadth= 10.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 length * breadth; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment