81. |
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:
Option (b) |
82. |
What will be the output of the program?
class Test { public static void main(String [] args) { int x= 0; int y= 0; for (int z = 0; z < 5; z++) { if (( ++x > 2 ) || (++y > 2)) { x++; } } System.out.println(x + " " + y); } }
|
||||||||
Answer:
Option (b) |
83. |
What will be the output of the program?
class Bitwise { public static void main(String [] args) { int x = 11 & 9; int y = x ^ 3; System.out.println( y | 12 ); } }
|
||||||||
Answer:
Option (d) |
84. |
Size of float and double in Java is
|
||||||||
Answer:
Option (a) |
85. |
What would be the output of the following fraction of code ?
int Integer = 34 ; char String = 'S' ; System.out.print( Integer ) ; System.out.print( String ) ;
|
||||||||
Answer:
Option (d) |
86. |
What will be output of the following program code?
public class Test{ public static void main(String[] a){ short x = 10; x = x*5; System.out.print(x); } }
|
||||||||
Answer:
Option (c) |
87. |
What will the output of the following program?
public class Test{ public static void main(String args[]){ float f = (1 / 4) * 10; int i = Math.round(f); System.out.println(i); } }
|
||||||||
Answer:
Option (b) |
88. |
What will be output of following program?
public class Test{ public static void main(String[] args){ byte b=127; b++; b++; System.out.println(b); } }
|
||||||||
Answer:
Option (c) |
89. |
What is the output for the below code ?
public class A{ static{ System.out.println("static"); } { System.out.println("block"); } public A(){ System.out.println("A"); } public static void main(String[] args){ A a = new A(); } }
|
||||||||
Answer:
Option (b) |
90. |
int x = 0, y = 0 , z = 0 ; x = (++x + y-- ) * z++;What will be the value of "x" after execution ?
|
||||||||
Answer:
Option (c) |