How do you write a java program to find a area of geometrical figure using method overloading?

Java

1 answer

Answer

1262329

2026-07-20 12:50

+ Follow

Java
Java

import Java.io.*;

public class Driven

{

static void main(String args[])throws IOException

{

InputStreamReader read=new InputStreamReader(System.in);

BufferedReader in= new BufferedReader(read);

System.out.println(" please enter length");

int a=Integer.parseInt(in.readLine());

System.out.println(" please enter breadth");

int b=Integer.parseInt(in.readLine());

int c=a*b;

System.out.println("The area of rectangle is "+c);

}

}

// when you run this program then in main menu to run this program write {} and then press ok

ReportLike(0ShareFavorite

Copyright © 2026 eLLeNow.com All Rights Reserved.