Created
November 22, 2016 12:55
-
-
Save daveRanjan/cce7f05dccde231060a8f14685275205 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 AreaFinder{ | |
public static void main(String[] args){ | |
//This will create an object of circle class | |
Shape circle = new Circle(); | |
//This will create an object of Rectangle class | |
Shape rectangle = new Rectangle(); | |
// Drumbeats …… | |
//This should print 78.5 | |
System.out.println(“Shape of circle : “+circle.area()); | |
//This should print 50.0 | |
System.out.println(“Shape of rectangle: “+rectangle.area()); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment