Java MCQ - English
What will be the output of these statement?
class output
{
Home | Discussion Forum
{
What will be the output of these statement?
class output
{
public static void main(String args[])
{
double a, b,c;
a = 3.0/0;
b = 0/4.0;
c=0/0.0;
System.out.println(a);
System.out.println(b);
System.out.println(c);
}
}
Answer : D
View More Related Question
1) What is the output of this program?
class increment
{
public static void main(String args[])
{
int g = 3;
System.out.print(++g * 8);
}
}
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 will be the output?
public class Test
{
public static void main(String args[])
{
int a = 42;
double b = 42.25;
System.out.print((a%10)+" "+(b%10));
}
}
4) 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));
}
}
5) What will be the output of these statement?
class output
{
public static void main(String args[])
{
double a, b,c;
a = 3.0/0;
b = 0/4.0;
c=0/0.0;
System.out.println(a);
System.out.println(b);
System.out.println(c);
}
}