Java Programming and Technical Programming Program

What is the output of this program?

class area {
public static void main(String args[])
{
double r, pi, a;
r = 9.8;
p1 = 3.14;
a = pi * r * r;
System.out.println(a);
}
}
a) 301.5656
b) 301
c) 301.56
d) 301.56560000

Read Solution (Total 41)

Java Other Question

What is the output of this program?

class conversion {
public static void main(String args[])
{
double a = 295.04;
int b = 300;
byte c = (byte) a;
byte d = (byte) b;
System.out.println(c + " " + d);
}
}
a) 38 43
b) 39 44
c) 295 300
d) 295.04 300
can we declare a subclass as a public
whose upper class has already been declared as private?