Sail E0 Webinar
Question


What is the output of this program?


class area {
public static void main(String args[])
{
double r, pi, a;
r = 9.8;
pi = 3.14;
a = pi * r * r;
System.out.println(a);
}
}
Options:
A .  301.5656
B .  301
C .  301.56
D .  301.56560000
Answer: Option A

None.
output:
$ javac area.java
$ java area
301.5656



Was this answer helpful ?
Next Question

Submit Solution

Your email address will not be published. Required fields are marked *

Latest Videos

Latest Test Papers