Physics, asked by javaask, 1 year ago

 \huge \bf{hello}
 \bf \color{tomato}{java \: question}

a java program for area of square

Answers

Answered by Anonymous
1
 \bf{ooooooo}

 \bf{solution}:-

import java.util.Scanner;
class SquareAreaDemo {
public static void main ()
{
System.out.println("Enter Side of Square:");
Scanner scanner = new Scanner(System.in);
double side = scanner.nextDouble();
double area = side*side;
System.out.println("Area of Square is: "+area);
}
}

taruntambrahalli: Please put the comments on the side it gets confusing .Excellent work though.
Answered by Anonymous
0

\huge{\mathfrak{\purple{Question}}}

+]>

A java program for area of square

\huge{\mathfrak{\red{Answer}}}

->>

♀️Java Program to Find Area of Square,Rectangle and Circle using Method Overloading

=>

♀️class OverloadDemo.

♀️void area(float x)

♀️System. out. println("the area of the square is "+Math.

♀️void area(float x, float y)

♀️System. out.

♀️void area(double x)

♀️double z = 3.14 * x * x;

♀️System. out.

_______________________❣️❣️

_______________________❣️❣️Hope it will Help you ❤️❤️

Similar questions