Java MCQ - English
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 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);
}
}
2) In Java, the ……………………… is used to access the instance variables and methods of class objects.
3) Which of these can be returned by the operator & ?
4) When one of the operands is real and the other is integer, the expression is called a ……………………. expression.
5) If j and k are int type variables, what will be the result of the expression j%k when j=10 and k=3?