Method Overloading Geekboots | Java Programming | Jun 06, 2016 import java.io.*; class formula { /* First method with the name 'area' */ void area(int r) { float a = 2 * (22/7) * r; System.out.println("Circle Area: "+a); } /* Second method with the name 'area' */ void area(int height, int width) { int a = height * width; System.out.println("Rectangle Area: "+a); } } class method_overloading { public static void main(String args[ ]) { formula ar = new formula(); ar.area(16); ar.area(15,18); } } Circle Area: 96.0Rectangle Area: 270 Learn more about Method Overloading java java language java programming method overloading in java java coding for area calculation geekboots tutorial geekboots java programming