What is the output of this program?
class booloperators
{ Home | Discussion Forum

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

View More Related Question

1) What is the output of this program?

class increment
{
public static void main(String args[])
{
double var1 = 1 + 5;
double var2 = var1 / 4;
int var3 = 1 + 5;
int var4 = var3 / 4;
System.out.print(var2 + " " + var4);
}
}

2) What is the output of this program?

class increment
{
public static void main(String args[])
{
int g = 3;
System.out.print(++g * 8);
}
}

3) What is the output of this program?

class average
{
public static void main(String args[])
{
double num[] = {5.5, 10.1, 11, 12.8, 56.9, 2.5};
double result;
result = 0;
for (int i = 0; i < 6; ++i)
result = result + num[i];
System.out.print(result/6);
}
}

4) What is the output of this program?
class asciicodes
{
public static void main(String args[])
{
char var1 = 'A';
char var2 = 'a';
System.out.println((int)var1 + " " + (int)var2);
}
}

5) What is the output of this program?

class array_output
{
public static void main(String args[])
{
char array_variable [] = new char[10];
for (int i = 0; i < 10; ++i)
{
array_variable[i] = 'i';
System.out.print(array_variable[i] + "" );
i++;
}
}
}

UP Gk Online Test

taiyari24hour.com