
Specifying Private Access Specifiers and Use of Public Methods 5.15
public double Find(double side){ return side*side;}//Area of square
public double Find(double l, double b){ return l*b;}//rectangle area
public double Find(double l , double b , double h){ return l*b*h;}
// cube vol
A second set of examples are for different types of arguments for overloaded methods
public int Find(int a , int b){ return (a<b) ? a:b);}// smaller of a & b
integers
public double Find(double a , double b){ return (a<b) ? a:b);}// smaller
of a & b double
Once you have declared the above overloaded methods, the following statements are not
overloaded methods and lead ...