What will be the output of the program?
  class Test
{
p

Home | Discussion Forum
Taiyari24Hour

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



View More Related Question

1) Which of the following is the correct expression that evaluates to true if the number x is between 1 and 100 or the number is negative?

2) If j and k are int type variables, what will be the result of the expression j%k when j=10 and k=3?

3) What will be the output after compiling and running following code?

public class Test
{
public static void main(String... args)
{
int x =5;
x *= 3 + 7;
System.out.println(x);
}
}

4) Which of the following can be operands of arithmetic operators?

5) When the operator ++ is placed after the variable name, first assignment of the value of the variable takes place and then the value of the variable is incremented, this operation is also called ………………………….. .

UP Gk Online Test

taiyari24hour.com

Study 2 Online Says....
Kindly log in or signup.