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

2) What will be result of the result of the expression -14%-3

3) 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?

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

5) If a=20 and b=15 then the statement x=(a>b) ? a:b; will assign value of x.

UP Gk Online Test

taiyari24hour.com

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