what is output of this program in java programming?
Answers
Answer:
Explanation:
The output of the Java compiler is byte code, which leads to the security and portability of the Java code
Output:
The area of Square = 625
The perimeter of Square = 100
The diagonal of Square = 35.35533905932738
Program :
public class Main
{
public static void main(String[] args) {
int s, ar=0,p=0;
double d=0.0;
s=25;
ar=s*s;
p=4*s;
d=Math.sqrt(2)*s;
System.out.println("The area of Square = "+ar);
System.out.println("The perimeter of Square = "+p);
System.out.println("The diagonal of Square = "+d);
}
}