Java MCQ - English
Modulus operator, %, can be applied to which of these?
Answer : C
View More Related Question
1) 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);
}
}
2) 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);
}
}
3) Which of these can be returned by the operator & ?
4) Decrement operator, −−, decreases value of variable by what number?
5) When a=9, b=12 and c=3 what will be the value of x for the expression x=9-12/3+3*2-1