Java MCQ - English
What will be the output of the program?
class Test
{
p
Home | Discussion Forum
{
p
What will be the output of the program? class Test
{
public static void main(String [] args)
{
int x=20;
String sup = (x < 15) ? "small" : (x < 22)? "tiny" : "huge";
System.out.println(sup);
}
}
Answer : B
View More Related Question
1) What will be the output of the above fraction of code ?int ++a = 100 ;
System.out.println( ++a ) ;
View Answer
2) If a and b are integers, then for a=14 and b=4 what will be the value of expression a/b.
3) When one of the operands is real and the other is integer, the expression is called a ……………………. expression.
4) public class Test
{
public static void main(String args[])
{
System.out.print(""=="");
System.out.print(" ");
System.out.print("A"=="A");
System.out.print(" ");
System.out.print("a==A");
}
}
5) What is the output of the following program ?class Numbers{
public static void main(String args[])
{
int a=20, b=10;
if((a < b) && (b++ < 25))
{ System.out.println("This is any language logic");
}
System.out.println(b);
}
}