What is the output of this program?
class area
{

Home | Discussion Forum

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);
}
}

View More Related Question

2) What is the output of this program?

class mainclass
{
public static void main(String args[])
{
boolean var1 = true;
boolean var2 = false;
if (var1)
System.out.println(var1);
else
System.out.println(var2);
}
}

3) What is the output of this program?

class booloperators
{
public static void main(String args[])
{
boolean var1 = true;
boolean var2 = false;
System.out.println((var2 & var2));
}
}

4) What is the output of this program?

class Modulus
{
public static void main(String args[])
{
double a = 25.64;
int b = 25;
a = a % 10;
b = b % 10;
System.out.println(a + " " + b);
}
}

5) What is the output of this program?

class evaluate
{
public static void main(String args[])
{
int a[] = {1,2,3,4,5};
int d[] = a;
int sum = 0;
for (int j = 0; j < 3; ++j)
sum += (a[j] * d[j + 1]) + (a[j + 1] * d[j]);
System.out.println(sum);
}
}

UP Gk Online Test

taiyari24hour.com

Study 2 Online Says....
Kindly log in or signup.