You are on page 1of 1

class area { void area(float l, float w, float h) { System.out.println("Area of ractangular box is " (l ! w ! h))" # void area(float l) { System.out.

println("Area of cube is " (l ! l ! l))" # void area(float r, float h) { System.out.println("Area of cylinder is " ($.%&%' ! r ! r ! h))" # # public class (onstr)verloading { public static void main(String args*+) { area over , new area()" over.area(-, ., /)" System.out.println("")" over.area(-)" System.out.println("")" over.area(', %0)" # # Output: Area of ractangular box is $'1.1 Area of cube is %0-.1 Area of cylinder is %$-2.%2%0

You might also like