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) 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) Modulus operator, %, can be applied to which of these?

3) What will be the values of x, y and z after execution of the following statements?

int x, y, z;
x=9;
y=10;
z=++x=y++;

4) In Java, the ……………………… is used to access the instance variables and methods of class objects.

5) When one of the operands is real and the other is integer, the expression is called a ……………………. expression.

UP Gk Online Test

taiyari24hour.com

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