0% found this document useful (0 votes)
7 views124 pages

Java Conditional Statement Outputs

The document presents a series of Java programs that utilize conditional statements to determine if a variable 'a' is greater than or equal to 10. Most of the programs output 'Smaller' for values of 'a' less than 10 and 'Greater' for values of 'a' equal to or greater than 10. The correct answers for each program are provided, highlighting the expected outputs based on the value of 'a'.

Uploaded by

aksharadeepa796
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
7 views124 pages

Java Conditional Statement Outputs

The document presents a series of Java programs that utilize conditional statements to determine if a variable 'a' is greater than or equal to 10. Most of the programs output 'Smaller' for values of 'a' less than 10 and 'Greater' for values of 'a' equal to or greater than 10. The correct answers for each program are provided, highlighting the expected outputs based on the value of 'a'.

Uploaded by

aksharadeepa796
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd

JAVA- CONDITIONAL STATEMENT (OUTPUT BASED)

1. What will be the output of the following Java program?

public class Example1 {

public static void main(String[] args) {

int a = 2;

if (a >= 10) {

[Link]("Greater");

} else {

[Link]("Smaller");

Options:

A. Greater

B. Smaller

C. Compilation error

D. No output

Correct Answer: B. Smaller

2. What will be the output of the following Java program?

public class Example2 {

public static void main(String[] args) {

int a = 3;

if (a >= 10) {
[Link]("Greater");

} else {

[Link]("Smaller");

Options:

A. Greater

B. Smaller

C. Compilation error

D. No output

Correct Answer: B. Smaller

3. What will be the output of the following Java program?

public class Example3 {

public static void main(String[] args) {

int a = 4;

if (a >= 10) {

[Link]("Greater");

} else {

[Link]("Smaller");

}
Options:

A. Greater

B. Smaller

C. Compilation error

D. No output

Correct Answer: B. Smaller

4. What will be the output of the following Java program?

public class Example4 {

public static void main(String[] args) {

int a = 5;

if (a >= 10) {

[Link]("Greater");

} else {

[Link]("Smaller");

Options:

A. Greater

B. Smaller

C. Compilation error

D. No output
Correct Answer: B. Smaller

5. What will be the output of the following Java program?

public class Example5 {

public static void main(String[] args) {

int a = 6;

if (a >= 10) {

[Link]("Greater");

} else {

[Link]("Smaller");

Options:

A. Greater

B. Smaller

C. Compilation error

D. No output

Correct Answer: B. Smaller

6. What will be the output of the following Java program?

public class Example6 {


public static void main(String[] args) {

int a = 7;

if (a >= 10) {

[Link]("Greater");

} else {

[Link]("Smaller");

Options:

A. Greater

B. Smaller

C. Compilation error

D. No output

Correct Answer: B. Smaller

7. What will be the output of the following Java program?

public class Example7 {

public static void main(String[] args) {

int a = 8;

if (a >= 10) {

[Link]("Greater");

} else {
[Link]("Smaller");

Options:

A. Greater

B. Smaller

C. Compilation error

D. No output

Correct Answer: B. Smaller

8. What will be the output of the following Java program?

public class Example8 {

public static void main(String[] args) {

int a = 9;

if (a >= 10) {

[Link]("Greater");

} else {

[Link]("Smaller");

Options:

A. Greater
B. Smaller

C. Compilation error

D. No output

Correct Answer: B. Smaller

9. What will be the output of the following Java program?

public class Example9 {

public static void main(String[] args) {

int a = 10;

if (a >= 10) {

[Link]("Greater");

} else {

[Link]("Smaller");

Options:

A. Greater

B. Smaller

C. Compilation error

D. No output

Correct Answer: A. Greater


10. What will be the output of the following Java program?

public class Example10 {

public static void main(String[] args) {

int a = 11;

if (a >= 10) {

[Link]("Greater");

} else {

[Link]("Smaller");

Options:

A. Greater

B. Smaller

C. Compilation error

D. No output

Correct Answer: A. Greater

11. What will be the output of the following Java program?

public class Example11 {

public static void main(String[] args) {

int a = 12;

if (a >= 10) {

[Link]("Greater");
} else {

[Link]("Smaller");

Options:

A. Greater

B. Smaller

C. Compilation error

D. No output

Correct Answer: A. Greater

12. What will be the output of the following Java program?

public class Example12 {

public static void main(String[] args) {

int a = 13;

if (a >= 10) {

[Link]("Greater");

} else {

[Link]("Smaller");

Options:
A. Greater

B. Smaller

C. Compilation error

D. No output

Correct Answer: A. Greater

13. What will be the output of the following Java program?

public class Example13 {

public static void main(String[] args) {

int a = 14;

if (a >= 10) {

[Link]("Greater");

} else {

[Link]("Smaller");

Options:

A. Greater

B. Smaller

C. Compilation error

D. No output

Correct Answer: A. Greater


14. What will be the output of the following Java program?

public class Example14 {

public static void main(String[] args) {

int a = 15;

if (a >= 10) {

[Link]("Greater");

} else {

[Link]("Smaller");

Options:

A. Greater

B. Smaller

C. Compilation error

D. No output

Correct Answer: A. Greater

15. What will be the output of the following Java program?

public class Example15 {

public static void main(String[] args) {

int a = 16;
if (a >= 10) {

[Link]("Greater");

} else {

[Link]("Smaller");

Options:

A. Greater

B. Smaller

C. Compilation error

D. No output

Correct Answer: A. Greater

16. What will be the output of the following Java program?

public class Example16 {

public static void main(String[] args) {

int a = 17;

if (a >= 10) {

[Link]("Greater");

} else {

[Link]("Smaller");

}
Options:

A. Greater

B. Smaller

C. Compilation error

D. No output

Correct Answer: A. Greater

17. What will be the output of the following Java program?

public class Example17 {

public static void main(String[] args) {

int a = 18;

if (a >= 10) {

[Link]("Greater");

} else {

[Link]("Smaller");

Options:

A. Greater

B. Smaller

C. Compilation error

D. No output

Correct Answer: A. Greater


18. What will be the output of the following Java program?

public class Example18 {

public static void main(String[] args) {

int a = 19;

if (a >= 10) {

[Link]("Greater");

} else {

[Link]("Smaller");

Options:

A. Greater

B. Smaller

C. Compilation error

D. No output

Correct Answer: A. Greater

19. What will be the output of the following Java program?

public class Example19 {

public static void main(String[] args) {

int a = 20;
if (a >= 10) {

[Link]("Greater");

} else {

[Link]("Smaller");

Options:

A. Greater

B. Smaller

C. Compilation error

D. No output

Correct Answer: A. Greater

20. What will be the output of the following Java program?

public class Example20 {

public static void main(String[] args) {

int a = 1;

if (a >= 10) {

[Link]("Greater");

} else {

[Link]("Smaller");

}
}

Options:

A. Greater

B. Smaller

C. Compilation error

D. No output

Correct Answer: B. Smaller

21. What will be the output of the following Java program?

public class Example21 {

public static void main(String[] args) {

int a = 2;

if (a >= 10) {

[Link]("Greater");

} else {

[Link]("Smaller");

Options:
A. Greater

B. Smaller

C. Compilation error

D. No output

Correct Answer: B. Smaller

22. What will be the output of the following Java program?

public class Example22 {

public static void main(String[] args) {

int a = 3;

if (a >= 10) {

[Link]("Greater");

} else {

[Link]("Smaller");

Options:

A. Greater

B. Smaller

C. Compilation error

D. No output

Correct Answer: B. Smaller


23. What will be the output of the following Java program?

public class Example23 {

public static void main(String[] args) {

int a = 4;

if (a >= 10) {

[Link]("Greater");

} else {

[Link]("Smaller");

Options:

A. Greater

B. Smaller

C. Compilation error

D. No output

Correct Answer: B. Smaller

24. What will be the output of the following Java program?

public class Example24 {

public static void main(String[] args) {

int a = 5;

if (a >= 10) {

[Link]("Greater");

} else {
[Link]("Smaller");

Options:

A. Greater

B. Smaller

C. Compilation error

D. No output

Correct Answer: B. Smaller

25. What will be the output of the following Java program?

public class Example25 {

public static void main(String[] args) {

int a = 6;

if (a >= 10) {

[Link]("Greater");

} else {

[Link]("Smaller");

Options:

A. Greater

B. Smaller
C. Compilation error

D. No output

Correct Answer: B. Smaller

26. What will be the output of the following Java program?

public class Example26 {

public static void main(String[] args) {

int a = 7;

if (a >= 10) {

[Link]("Greater");

} else {

[Link]("Smaller");

Options:

A. Greater

B. Smaller

C. Compilation error

D. No output

Correct Answer: B. Smaller

27. What will be the output of the following Java program?

public class Example27 {

public static void main(String[] args) {


int a = 8;

if (a >= 10) {

[Link]("Greater");

} else {

[Link]("Smaller");

Options:

A. Greater

B. Smaller

C. Compilation error

D. No output

Correct Answer: B. Smaller

28. What will be the output of the following Java program?

public class Example28 {

public static void main(String[] args) {

int a = 9;

if (a >= 10) {

[Link]("Greater");

} else {

[Link]("Smaller");

}
}

Options:

A. Greater

B. Smaller

C. Compilation error

D. No output

Correct Answer: B. Smaller

29. What will be the output of the following Java program?

public class Example29 {

public static void main(String[] args) {

int a = 10;

if (a >= 10) {

[Link]("Greater");

} else {

[Link]("Smaller");

Options:

A. Greater

B. Smaller

C. Compilation error

D. No output

Correct Answer: A. Greater


30. What will be the output of the following Java program?

public class Example30 {

public static void main(String[] args) {

int a = 11;

if (a >= 10) {

[Link]("Greater");

} else {

[Link]("Smaller");

Options:

A. Greater

B. Smaller

C. Compilation error

D. No output

Correct Answer: A. Greater

31. What will be the output of the following Java program?

public class Example31 {

public static void main(String[] args) {

int a = 12;

if (a >= 10) {

[Link]("Greater");
} else {

[Link]("Smaller");

Options:

A. Greater

B. Smaller

C. Compilation error

D. No output

Correct Answer: A. Greater

32. What will be the output of the following Java program?

public class Example32 {

public static void main(String[] args) {

int a = 13;

if (a >= 10) {

[Link]("Greater");

} else {

[Link]("Smaller");

Options:

A. Greater
B. Smaller

C. Compilation error

D. No output

Correct Answer: A. Greater

33. What will be the output of the following Java program?

public class Example33 {

public static void main(String[] args) {

int a = 14;

if (a >= 10) {

[Link]("Greater");

} else {

[Link]("Smaller");

Options:

A. Greater

B. Smaller

C. Compilation error

D. No output

Correct Answer: A. Greater

34. What will be the output of the following Java program?

public class Example34 {


public static void main(String[] args) {

int a = 15;

if (a >= 10) {

[Link]("Greater");

} else {

[Link]("Smaller");

Options:

A. Greater

B. Smaller

C. Compilation error

D. No output

Correct Answer: A. Greater

35. What will be the output of the following Java program?

public class Example35 {

public static void main(String[] args) {

int a = 16;

if (a >= 10) {

[Link]("Greater");

} else {

[Link]("Smaller");

}
}

Options:

A. Greater

B. Smaller

C. Compilation error

D. No output

Correct Answer: A. Greater

36. What will be the output of the following Java program?

public class Example36 {

public static void main(String[] args) {

int a = 17;

if (a >= 10) {

[Link]("Greater");

} else {

[Link]("Smaller");

Options:

A. Greater

B. Smaller

C. Compilation error

D. No output
Correct Answer: A. Greater

37. What will be the output of the following Java program?

public class Example37 {

public static void main(String[] args) {

int a = 18;

if (a >= 10) {

[Link]("Greater");

} else {

[Link]("Smaller");

Options:

A. Greater

B. Smaller

C. Compilation error

D. No output

Correct Answer: A. Greater

38. What will be the output of the following Java program?

public class Example38 {

public static void main(String[] args) {

int a = 19;

if (a >= 10) {
[Link]("Greater");

} else {

[Link]("Smaller");

Options:

A. Greater

B. Smaller

C. Compilation error

D. No output

Correct Answer: A. Greater

39. What will be the output of the following Java program?

public class Example39 {

public static void main(String[] args) {

int a = 20;

if (a >= 10) {

[Link]("Greater");

} else {

[Link]("Smaller");

Options:
A. Greater

B. Smaller

C. Compilation error

D. No output

Correct Answer: A. Greater

40. What will be the output of the following Java program?

public class Example40 {

public static void main(String[] args) {

int a = 1;

if (a >= 10) {

[Link]("Greater");

} else {

[Link]("Smaller");

Options:

A. Greater

B. Smaller

C. Compilation error

D. No output

Correct Answer: B. Smaller

41. What will be the output of the following Java program?


public class Example41 {

public static void main(String[] args) {

int a = 2;

if (a >= 10) {

[Link]("Greater");

} else {

[Link]("Smaller");

Options:

A. Greater

B. Smaller

C. Compilation error

D. No output

Correct Answer: B. Smaller

42. What will be the output of the following Java program?

public class Example42 {

public static void main(String[] args) {

int a = 3;

if (a >= 10) {

[Link]("Greater");

} else {

[Link]("Smaller");
}

Options:

A. Greater

B. Smaller

C. Compilation error

D. No output

Correct Answer: B. Smaller

43. What will be the output of the following Java program?

public class Example43 {

public static void main(String[] args) {

int a = 4;

if (a >= 10) {

[Link]("Greater");

} else {

[Link]("Smaller");

Options:

A. Greater

B. Smaller

C. Compilation error
D. No output

Correct Answer: B. Smaller

44. What will be the output of the following Java program?

public class Example44 {

public static void main(String[] args) {

int a = 5;

if (a >= 10) {

[Link]("Greater");

} else {

[Link]("Smaller");

Options:

A. Greater

B. Smaller

C. Compilation error

D. No output

Correct Answer: B. Smaller

45. What will be the output of the following Java program?

public class Example45 {

public static void main(String[] args) {

int a = 6;
if (a >= 10) {

[Link]("Greater");

} else {

[Link]("Smaller");

Options:

A. Greater

B. Smaller

C. Compilation error

D. No output

Correct Answer: B. Smaller

46. What will be the output of the following Java program?

public class Example46 {

public static void main(String[] args) {

int a = 7;

if (a >= 10) {

[Link]("Greater");

} else {

[Link]("Smaller");

}
Options:

A. Greater

B. Smaller

C. Compilation error

D. No output

Correct Answer: B. Smaller

47. What will be the output of the following Java program?

public class Example47 {

public static void main(String[] args) {

int a = 8;

if (a >= 10) {

[Link]("Greater");

} else {

[Link]("Smaller");

Options:

A. Greater

B. Smaller

C. Compilation error

D. No output

Correct Answer: B. Smaller


48. What will be the output of the following Java program?

public class Example48 {

public static void main(String[] args) {

int a = 9;

if (a >= 10) {

[Link]("Greater");

} else {

[Link]("Smaller");

Options:

A. Greater

B. Smaller

C. Compilation error

D. No output

Correct Answer: B. Smaller

49. What will be the output of the following Java program?

public class Example49 {

public static void main(String[] args) {

int a = 10;

if (a >= 10) {

[Link]("Greater");

} else {
[Link]("Smaller");

Options:

A. Greater

B. Smaller

C. Compilation error

D. No output

Correct Answer: A. Greater

50. What will be the output of the following Java program?

public class Example50 {

public static void main(String[] args) {

int a = 11;

if (a >= 10) {

[Link]("Greater");

} else {

[Link]("Smaller");

Options:

A. Greater

B. Smaller
C. Compilation error

D. No output

Correct Answer: A. Greater

51. What will be the output of the following Java program?

public class Example51 {

public static void main(String[] args) {

int a = 12;

if (a >= 10) {

[Link]("Greater");

} else {

[Link]("Smaller");

Options:

A. Greater

B. Smaller

C. Compilation error

D. No output

Correct Answer: A. Greater

52. What will be the output of the following Java program?

public class Example52 {


public static void main(String[] args) {

int a = 13;

if (a >= 10) {

[Link]("Greater");

} else {

[Link]("Smaller");

Options:

A. Greater

B. Smaller

C. Compilation error

D. No output

Correct Answer: A. Greater

53. What will be the output of the following Java program?

public class Example53 {

public static void main(String[] args) {

int a = 14;

if (a >= 10) {

[Link]("Greater");

} else {

[Link]("Smaller");

}
}

Options:

A. Greater

B. Smaller

C. Compilation error

D. No output

Correct Answer: A. Greater

54. What will be the output of the following Java program?

public class Example54 {

public static void main(String[] args) {

int a = 15;

if (a >= 10) {

[Link]("Greater");

} else {

[Link]("Smaller");

Options:

A. Greater

B. Smaller

C. Compilation error

D. No output
Correct Answer: A. Greater

55. What will be the output of the following Java program?

public class Example55 {

public static void main(String[] args) {

int a = 16;

if (a >= 10) {

[Link]("Greater");

} else {

[Link]("Smaller");

Options:

A. Greater

B. Smaller

C. Compilation error

D. No output

Correct Answer: A. Greater

56. What will be the output of the following Java program?


public class Example56 {

public static void main(String[] args) {

int a = 17;

if (a >= 10) {

[Link]("Greater");

} else {

[Link]("Smaller");

Options:

A. Greater

B. Smaller

C. Compilation error

D. No output

Correct Answer: A. Greater

57. What will be the output of the following Java program?

public class Example57 {

public static void main(String[] args) {

int a = 18;
if (a >= 10) {

[Link]("Greater");

} else {

[Link]("Smaller");

Options:

A. Greater

B. Smaller

C. Compilation error

D. No output

Correct Answer: A. Greater

58. What will be the output of the following Java program?

public class Example58 {

public static void main(String[] args) {

int a = 19;

if (a >= 10) {

[Link]("Greater");

} else {

[Link]("Smaller");

}
}

Options:

A. Greater

B. Smaller

C. Compilation error

D. No output

Correct Answer: A. Greater

59. What will be the output of the following Java program?

public class Example59 {

public static void main(String[] args) {

int a = 20;

if (a >= 10) {

[Link]("Greater");

} else {

[Link]("Smaller");

Options:

A. Greater

B. Smaller

C. Compilation error

D. No output

Correct Answer: A. Greater


60. What will be the output of the following Java program?

public class Example60 {

public static void main(String[] args) {

int a = 1;

if (a >= 10) {

[Link]("Greater");

} else {

[Link]("Smaller");

Options:

A. Greater

B. Smaller

C. Compilation error

D. No output

Correct Answer: B. Smaller

61. What will be the output of the following Java program?

public class Example61 {

public static void main(String[] args) {

int a = 2;

if (a >= 10) {

[Link]("Greater");
} else {

[Link]("Smaller");

Options:

A. Greater

B. Smaller

C. Compilation error

D. No output

Correct Answer: B. Smaller

62. What will be the output of the following Java program?

public class Example62 {

public static void main(String[] args) {

int a = 3;

if (a >= 10) {

[Link]("Greater");

} else {

[Link]("Smaller");

Options:

A. Greater
B. Smaller

C. Compilation error

D. No output

Correct Answer: B. Smaller

63. What will be the output of the following Java program?

public class Example63 {

public static void main(String[] args) {

int a = 4;

if (a >= 10) {

[Link]("Greater");

} else {

[Link]("Smaller");

Options:

A. Greater

B. Smaller

C. Compilation error

D. No output

Correct Answer: B. Smaller

64. What will be the output of the following Java program?

public class Example64 {


public static void main(String[] args) {

int a = 5;

if (a >= 10) {

[Link]("Greater");

} else {

[Link]("Smaller");

Options:

A. Greater

B. Smaller

C. Compilation error

D. No output

Correct Answer: B. Smaller

65. What will be the output of the following Java program?

public class Example65 {

public static void main(String[] args) {

int a = 6;

if (a >= 10) {

[Link]("Greater");

} else {

[Link]("Smaller");

}
}

Options:

A. Greater

B. Smaller

C. Compilation error

D. No output

Correct Answer: B. Smaller

66. What will be the output of the following Java program?

public class Example66 {

public static void main(String[] args) {

int a = 7;

if (a >= 10) {

[Link]("Greater");

} else {

[Link]("Smaller");

Options:

A. Greater

B. Smaller

C. Compilation error

D. No output
Correct Answer: B. Smaller

67. What will be the output of the following Java program?

public class Example67 {

public static void main(String[] args) {

int a = 8;

if (a >= 10) {

[Link]("Greater");

} else {

[Link]("Smaller");

Options:

A. Greater

B. Smaller

C. Compilation error

D. No output

Correct Answer: B. Smaller

68. What will be the output of the following Java program?

public class Example68 {

public static void main(String[] args) {

int a = 9;

if (a >= 10) {
[Link]("Greater");

} else {

[Link]("Smaller");

Options:

A. Greater

B. Smaller

C. Compilation error

D. No output

Correct Answer: B. Smaller

69. What will be the output of the following Java program?

public class Example69 {

public static void main(String[] args) {

int a = 10;

if (a >= 10) {

[Link]("Greater");

} else {

[Link]("Smaller");

Options:
A. Greater

B. Smaller

C. Compilation error

D. No output

Correct Answer: A. Greater

70. What will be the output of the following Java program?

public class Example70 {

public static void main(String[] args) {

int a = 11;

if (a >= 10) {

[Link]("Greater");

} else {

[Link]("Smaller");

Options:

A. Greater

B. Smaller

C. Compilation error

D. No output

Correct Answer: A. Greater

71. What will be the output of the following Java program?


public class Example71 {

public static void main(String[] args) {

int a = 12;

if (a >= 10) {

[Link]("Greater");

} else {

[Link]("Smaller");

Options:

A. Greater

B. Smaller

C. Compilation error

D. No output

Correct Answer: A. Greater

72. What will be the output of the following Java program?

public class Example72 {

public static void main(String[] args) {

int a = 13;

if (a >= 10) {

[Link]("Greater");

} else {

[Link]("Smaller");
}

Options:

A. Greater

B. Smaller

C. Compilation error

D. No output

Correct Answer: A. Greater

73. What will be the output of the following Java program?

public class Example73 {

public static void main(String[] args) {

int a = 14;

if (a >= 10) {

[Link]("Greater");

} else {

[Link]("Smaller");

Options:

A. Greater

B. Smaller

C. Compilation error
D. No output

Correct Answer: A. Greater

74. What will be the output of the following Java program?

public class Example74 {

public static void main(String[] args) {

int a = 15;

if (a >= 10) {

[Link]("Greater");

} else {

[Link]("Smaller");

Options:

A. Greater

B. Smaller

C. Compilation error

D. No output

Correct Answer: A. Greater

75. What will be the output of the following Java program?

public class Example75 {

public static void main(String[] args) {

int a = 16;
if (a >= 10) {

[Link]("Greater");

} else {

[Link]("Smaller");

Options:

A. Greater

B. Smaller

C. Compilation error

D. No output

Correct Answer: A. Greater

76. What will be the output of the following Java program?

public class Example76 {

public static void main(String[] args) {

int a = 17;

if (a >= 10) {

[Link]("Greater");

} else {

[Link]("Smaller");

}
Options:

A. Greater

B. Smaller

C. Compilation error

D. No output

Correct Answer: A. Greater

77. What will be the output of the following Java program?

public class Example77 {

public static void main(String[] args) {

int a = 18;

if (a >= 10) {

[Link]("Greater");

} else {

[Link]("Smaller");

Options:

A. Greater

B. Smaller

C. Compilation error

D. No output

Correct Answer: A. Greater


78. What will be the output of the following Java program?

public class Example78 {

public static void main(String[] args) {

int a = 19;

if (a >= 10) {

[Link]("Greater");

} else {

[Link]("Smaller");

Options:

A. Greater

B. Smaller

C. Compilation error

D. No output

Correct Answer: A. Greater

79. What will be the output of the following Java program?

public class Example79 {

public static void main(String[] args) {

int a = 20;

if (a >= 10) {

[Link]("Greater");

} else {
[Link]("Smaller");

Options:

A. Greater

B. Smaller

C. Compilation error

D. No output

Correct Answer: A. Greater

80. What will be the output of the following Java program?

public class Example80 {

public static void main(String[] args) {

int a = 1;

if (a >= 10) {

[Link]("Greater");

} else {

[Link]("Smaller");

Options:

A. Greater
B. Smaller

C. Compilation error

D. No output

Correct Answer: B. Smaller

81. What will be the output of the following Java program?

public class Example81 {

public static void main(String[] args) {

int a = 2;

if (a >= 10) {

[Link]("Greater");

} else {

[Link]("Smaller");

Options:

A. Greater

B. Smaller

C. Compilation error

D. No output

Correct Answer: B. Smaller

82. What will be the output of the following Java program?


public class Example82 {

public static void main(String[] args) {

int a = 3;

if (a >= 10) {

[Link]("Greater");

} else {

[Link]("Smaller");

Options:

A. Greater

B. Smaller

C. Compilation error

D. No output

Correct Answer: B. Smaller

83. What will be the output of the following Java program?

public class Example83 {

public static void main(String[] args) {

int a = 4;

if (a >= 10) {

[Link]("Greater");
} else {

[Link]("Smaller");

Options:

A. Greater

B. Smaller

C. Compilation error

D. No output

Correct Answer: B. Smaller

84. What will be the output of the following Java program?

public class Example84 {

public static void main(String[] args) {

int a = 5;

if (a >= 10) {

[Link]("Greater");

} else {

[Link]("Smaller");

Options:
A. Greater

B. Smaller

C. Compilation error

D. No output

Correct Answer: B. Smaller

85. What will be the output of the following Java program?

public class Example85 {

public static void main(String[] args) {

int a = 6;

if (a >= 10) {

[Link]("Greater");

} else {

[Link]("Smaller");

Options:

A. Greater

B. Smaller

C. Compilation error

D. No output

Correct Answer: B. Smaller

86. What will be the output of the following Java program?


public class Example86 {

public static void main(String[] args) {

int a = 7;

if (a >= 10) {

[Link]("Greater");

} else {

[Link]("Smaller");

Options:

A. Greater

B. Smaller

C. Compilation error

D. No output

Correct Answer: B. Smaller

87. What will be the output of the following Java program?

public class Example87 {

public static void main(String[] args) {

int a = 8;

if (a >= 10) {

[Link]("Greater");

} else {

[Link]("Smaller");
}

Options:

A. Greater

B. Smaller

C. Compilation error

D. No output

Correct Answer: B. Smaller

88. What will be the output of the following Java program?

public class Example88 {

public static void main(String[] args) {

int a = 9;

if (a >= 10) {

[Link]("Greater");

} else {

[Link]("Smaller");

Options:

A. Greater

B. Smaller

C. Compilation error
D. No output

Correct Answer: B. Smaller

89. What will be the output of the following Java program?

public class Example89 {

public static void main(String[] args) {

int a = 10;

if (a >= 10) {

[Link]("Greater");

} else {

[Link]("Smaller");

Options:

A. Greater

B. Smaller

C. Compilation error

D. No output

Correct Answer: A. Greater

90. What will be the output of the following Java program?

public class Example90 {

public static void main(String[] args) {

int a = 11;
if (a >= 10) {

[Link]("Greater");

} else {

[Link]("Smaller");

Options:

A. Greater

B. Smaller

C. Compilation error

D. No output

Correct Answer: A. Greater

91. What will be the output of the following Java program?

public class Example91 {

public static void main(String[] args) {

int a = 12;

if (a >= 10) {

[Link]("Greater");

} else {

[Link]("Smaller");

}
Options:

A. Greater

B. Smaller

C. Compilation error

D. No output

Correct Answer: A. Greater

92. What will be the output of the following Java program?

public class Example92 {

public static void main(String[] args) {

int a = 13;

if (a >= 10) {

[Link]("Greater");

} else {

[Link]("Smaller");

Options:

A. Greater

B. Smaller

C. Compilation error

D. No output

Correct Answer: A. Greater


93. What will be the output of the following Java program?

public class Example93 {

public static void main(String[] args) {

int a = 14;

if (a >= 10) {

[Link]("Greater");

} else {

[Link]("Smaller");

Options:

A. Greater

B. Smaller

C. Compilation error

D. No output

Correct Answer: A. Greater

94. What will be the output of the following Java program?

public class Example94 {

public static void main(String[] args) {

int a = 15;

if (a >= 10) {
[Link]("Greater");

} else {

[Link]("Smaller");

Options:

A. Greater

B. Smaller

C. Compilation error

D. No output

Correct Answer: A. Greater

95. What will be the output of the following Java program?

public class Example95 {

public static void main(String[] args) {

int a = 16;

if (a >= 10) {

[Link]("Greater");

} else {

[Link]("Smaller");

Options:
A. Greater

B. Smaller

C. Compilation error

D. No output

Correct Answer: A. Greater

96. What will be the output of the following Java program?

public class Example96 {

public static void main(String[] args) {

int a = 17;

if (a >= 10) {

[Link]("Greater");

} else {

[Link]("Smaller");

Options:

A. Greater

B. Smaller

C. Compilation error

D. No output

Correct Answer: A. Greater

97. What will be the output of the following Java program?


public class Example97 {

public static void main(String[] args) {

int a = 18;

if (a >= 10) {

[Link]("Greater");

} else {

[Link]("Smaller");

Options:

A. Greater

B. Smaller

C. Compilation error

D. No output

Correct Answer: A. Greater

98. What will be the output of the following Java program?

public class Example98 {

public static void main(String[] args) {

int a = 19;

if (a >= 10) {

[Link]("Greater");
} else {

[Link]("Smaller");

Options:

A. Greater

B. Smaller

C. Compilation error

D. No output

Correct Answer: A. Greater

99. What will be the output of the following Java program?

public class Example99 {

public static void main(String[] args) {

int a = 20;

if (a >= 10) {

[Link]("Greater");

} else {

[Link]("Smaller");

Options:
A. Greater

B. Smaller

C. Compilation error

D. No output

Correct Answer: A. Greater

100. What will be the output of the following Java program?

public class Example100 {

public static void main(String[] args) {

int a = 1;

if (a >= 10) {

[Link]("Greater");

} else {

[Link]("Smaller");

Options:

A. Greater

B. Smaller

C. Compilation error

D. No output

Correct Answer: B. Smaller

101. What will be the output of the following Java program?


public class Example {
public static void main(String[] args) {
int a = -19;
if (a > 0)
[Link]("Positive");
else
[Link]("Non-Positive");
}
}

Options:
A. Positive
B. Non-Positive
C. Compilation error
D. No output

Correct Answer: A or B (based on value)

102. What will be the output of the following Java program?


public class Example {
public static void main(String[] args) {
int a = -18;
if (a > 0)
[Link]("Positive");
else
[Link]("Non-Positive");
}
}

Options:
A. Positive
B. Non-Positive
C. Compilation error
D. No output

Correct Answer: A or B (based on value)

103. What will be the output of the following Java program?

public class Example {


public static void main(String[] args) {
int a = -17;
if (a > 0)
[Link]("Positive");
else
[Link]("Non-Positive");
}
}

Options:
A. Positive
B. Non-Positive
C. Compilation error
D. No output

Correct Answer: A or B (based on value)

104. What will be the output of the following Java program?

public class Example {


public static void main(String[] args) {
int a = -16;
if (a > 0)
[Link]("Positive");
else
[Link]("Non-Positive");
}
}

Options:
A. Positive
B. Non-Positive
C. Compilation error
D. No output

Correct Answer: A or B (based on value)

105. What will be the output of the following Java program?

public class Example {


public static void main(String[] args) {
int a = -15;
if (a > 0)
[Link]("Positive");
else
[Link]("Non-Positive");
}
}
Options:
A. Positive
B. Non-Positive
C. Compilation error
D. No output

Correct Answer: A or B (based on value)

106. What will be the output of the following Java program?

public class Example {


public static void main(String[] args) {
int a = -14;
if (a > 0)
[Link]("Positive");
else
[Link]("Non-Positive");
}
}

Options:
A. Positive
B. Non-Positive
C. Compilation error
D. No output

Correct Answer: A or B (based on value)

107. What will be the output of the following Java program?

public class Example {


public static void main(String[] args) {
int a = -13;
if (a > 0)
[Link]("Positive");
else
[Link]("Non-Positive");
}
}

Options:
A. Positive
B. Non-Positive
C. Compilation error
D. No output

Correct Answer: A or B (based on value)

108. What will be the output of the following Java program?

public class Example {


public static void main(String[] args) {
int a = -12;
if (a > 0)
[Link]("Positive");
else
[Link]("Non-Positive");
}
}

Options:
A. Positive
B. Non-Positive
C. Compilation error
D. No output

Correct Answer: A or B (based on value)

109. What will be the output of the following Java program?


public class Example {
public static void main(String[] args) {
int a = -11;
if (a > 0)
[Link]("Positive");
else
[Link]("Non-Positive");
}
}

Options:
A. Positive
B. Non-Positive
C. Compilation error
D. No output
Correct Answer: A or B (based on value)

110. What will be the output of the following Java program?

public class Example {


public static void main(String[] args) {
int a = -10;
if (a > 0)
[Link]("Positive");
else
[Link]("Non-Positive");
}
}

Options:
A. Positive
B. Non-Positive
C. Compilation error
D. No output

Correct Answer: A or B (based on value)

111. What will be the output of the following Java program?

public class Example {


public static void main(String[] args) {
int a = -9;
if (a > 0)
[Link]("Positive");
else
[Link]("Non-Positive");
}
}

Options:
A. Positive
B. Non-Positive
C. Compilation error
D. No output

Correct Answer: A or B (based on value)


112. What will be the output of the following Java program?

public class Example {


public static void main(String[] args) {
int a = -8;
if (a > 0)
[Link]("Positive");
else
[Link]("Non-Positive");
}
}

Options:
A. Positive
B. Non-Positive
C. Compilation error
D. No output

Correct Answer: A or B (based on value)

113. What will be the output of the following Java program?

public class Example {


public static void main(String[] args) {
int a = -7;
if (a > 0)
[Link]("Positive");
else
[Link]("Non-Positive");
}
}

Options:
A. Positive
B. Non-Positive
C. Compilation error
D. No output

Correct Answer: A or B (based on value)

114. What will be the output of the following Java program?


public class Example {
public static void main(String[] args) {
int a = -6;
if (a > 0)
[Link]("Positive");
else
[Link]("Non-Positive");
}
}

Options:
A. Positive
B. Non-Positive
C. Compilation error
D. No output

Correct Answer: A or B (based on value)

115. What will be the output of the following Java program?

public class Example {


public static void main(String[] args) {
int a = -5;
if (a > 0)
[Link]("Positive");
else
[Link]("Non-Positive");
}
}

Options:
A. Positive
B. Non-Positive
C. Compilation error
D. No output

Correct Answer: A or B (based on value)

116. What will be the output of the following Java program?


public class Example {
public static void main(String[] args) {
int a = -4;
if (a > 0)
[Link]("Positive");
else
[Link]("Non-Positive");
}
}

Options:
A. Positive
B. Non-Positive
C. Compilation error
D. No output

Correct Answer: A or B (based on value)

117. What will be the output of the following Java program?

public class Example {


public static void main(String[] args) {
int a = -3;
if (a > 0)
[Link]("Positive");
else
[Link]("Non-Positive");
}
}

Options:
A. Positive
B. Non-Positive
C. Compilation error
D. No output

Correct Answer: A or B (based on value)

118. What will be the output of the following Java program?


public class Example {
public static void main(String[] args) {
int a = -2;
if (a > 0)
[Link]("Positive");
else
[Link]("Non-Positive");
}
}

Options:
A. Positive
B. Non-Positive
C. Compilation error
D. No output

Correct Answer: A or B (based on value)

119. What will be the output of the following Java program?

public class Example {


public static void main(String[] args) {
int a = -1;
if (a > 0)
[Link]("Positive");
else
[Link]("Non-Positive");
}
}

Options:
A. Positive
B. Non-Positive
C. Compilation error
D. No output

Correct Answer: A or B (based on value)

120. What will be the output of the following Java program?


public class Example {
public static void main(String[] args) {
int a = 0;
if (a > 0)
[Link]("Positive");
else
[Link]("Non-Positive");
}
}

Options:
A. Positive
B. Non-Positive
C. Compilation error
D. No output

Correct Answer: A or B (based on value)

121. What will be the output of the following Java program?

public class Example {


public static void main(String[] args) {
int a = 1;
if (a > 0)
[Link]("Positive");
else
[Link]("Non-Positive");
}
}

Options:
A. Positive
B. Non-Positive
C. Compilation error
D. No output

Correct Answer: A or B (based on value)

122. What will be the output of the following Java program?


public class Example {
public static void main(String[] args) {
int a = 2;
if (a > 0)
[Link]("Positive");
else
[Link]("Non-Positive");
}
}

Options:
A. Positive
B. Non-Positive
C. Compilation error
D. No output

Correct Answer: A or B (based on value)

123. What will be the output of the following Java program?

public class Example {


public static void main(String[] args) {
int a = 3;
if (a > 0)
[Link]("Positive");
else
[Link]("Non-Positive");
}
}

Options:
A. Positive
B. Non-Positive
C. Compilation error
D. No output

Correct Answer: A or B (based on value)

124. What will be the output of the following Java program?


public class Example {
public static void main(String[] args) {
int a = 4;
if (a > 0)
[Link]("Positive");
else
[Link]("Non-Positive");
}
}

Options:
A. Positive
B. Non-Positive
C. Compilation error
D. No output

Correct Answer: A or B (based on value)

125. What will be the output of the following Java program?

public class Example {


public static void main(String[] args) {
int a = 5;
if (a > 0)
[Link]("Positive");
else
[Link]("Non-Positive");
}
}

Options:
A. Positive
B. Non-Positive
C. Compilation error
D. No output

Correct Answer: A or B (based on value)

126. What will be the output of the following Java program?


public class Example {
public static void main(String[] args) {
int a = 6;
if (a > 0)
[Link]("Positive");
else
[Link]("Non-Positive");
}
}

Options:
A. Positive
B. Non-Positive
C. Compilation error
D. No output

Correct Answer: A or B (based on value)

127. What will be the output of the following Java program?

public class Example {


public static void main(String[] args) {
int a = 7;
if (a > 0)
[Link]("Positive");
else
[Link]("Non-Positive");
}
}

Options:
A. Positive
B. Non-Positive
C. Compilation error
D. No output

Correct Answer: A or B (based on value)

128. What will be the output of the following Java program?


public class Example {
public static void main(String[] args) {
int a = 8;
if (a > 0)
[Link]("Positive");
else
[Link]("Non-Positive");
}
}

Options:
A. Positive
B. Non-Positive
C. Compilation error
D. No output

Correct Answer: A or B (based on value)

129. What will be the output of the following Java program?

public class Example {


public static void main(String[] args) {
int a = 9;
if (a > 0)
[Link]("Positive");
else
[Link]("Non-Positive");
}
}

Options:
A. Positive
B. Non-Positive
C. Compilation error
D. No output

Correct Answer: A or B (based on value)

130. What will be the output of the following Java program?


public class Example {
public static void main(String[] args) {
int a = 10;
if (a > 0)
[Link]("Positive");
else
[Link]("Non-Positive");
}
}

Options:
A. Positive
B. Non-Positive
C. Compilation error
D. No output

Correct Answer: A or B (based on value)

131. What will be the output of the following Java program?

public class Example {


public static void main(String[] args) {
int a = 11;
if (a > 0)
[Link]("Positive");
else
[Link]("Non-Positive");
}
}

Options:
A. Positive
B. Non-Positive
C. Compilation error
D. No output

Correct Answer: A or B (based on value)

132. What will be the output of the following Java program?


public class Example {
public static void main(String[] args) {
int a = 12;
if (a > 0)
[Link]("Positive");
else
[Link]("Non-Positive");
}
}

Options:
A. Positive
B. Non-Positive
C. Compilation error
D. No output

Correct Answer: A or B (based on value)

133. What will be the output of the following Java program?

public class Example {


public static void main(String[] args) {
int a = 13;
if (a > 0)
[Link]("Positive");
else
[Link]("Non-Positive");
}
}

Options:
A. Positive
B. Non-Positive
C. Compilation error
D. No output

Correct Answer: A or B (based on value)

134. What will be the output of the following Java program?


public class Example {
public static void main(String[] args) {
int a = 14;
if (a > 0)
[Link]("Positive");
else
[Link]("Non-Positive");
}
}

Options:
A. Positive
B. Non-Positive
C. Compilation error
D. No output

Correct Answer: A or B (based on value)

135. What will be the output of the following Java program?

public class Example {


public static void main(String[] args) {
int a = 15;
if (a > 0)
[Link]("Positive");
else
[Link]("Non-Positive");
}
}

Options:
A. Positive
B. Non-Positive
C. Compilation error
D. No output

Correct Answer: A or B (based on value)

136. What will be the output of the following Java program?


public class Example {
public static void main(String[] args) {
int a = 16;
if (a > 0)
[Link]("Positive");
else
[Link]("Non-Positive");
}
}

Options:
A. Positive
B. Non-Positive
C. Compilation error
D. No output

Correct Answer: A or B (based on value)

137. What will be the output of the following Java program?

public class Example {


public static void main(String[] args) {
int a = 17;
if (a > 0)
[Link]("Positive");
else
[Link]("Non-Positive");
}
}

Options:
A. Positive
B. Non-Positive
C. Compilation error
D. No output

Correct Answer: A or B (based on value)

138. What will be the output of the following Java program?


public class Example {
public static void main(String[] args) {
int a = 18;
if (a > 0)
[Link]("Positive");
else
[Link]("Non-Positive");
}
}

Options:
A. Positive
B. Non-Positive
C. Compilation error
D. No output

Correct Answer: A or B (based on value)

139. What will be the output of the following Java program?

public class Example {


public static void main(String[] args) {
int a = 19;
if (a > 0)
[Link]("Positive");
else
[Link]("Non-Positive");
}
}

Options:
A. Positive
B. Non-Positive
C. Compilation error
D. No output

Correct Answer: A or B (based on value)

140. What will be the output of the following Java program?


public class Example {
public static void main(String[] args) {
int a = 20;
if (a > 0)
[Link]("Positive");
else
[Link]("Non-Positive");
}
}

Options:
A. Positive
B. Non-Positive
C. Compilation error
D. No output

Correct Answer: A or B (based on value)

141. What will be the output of the following Java program?

public class Example {


public static void main(String[] args) {
int a = 21;
if (a > 0)
[Link]("Positive");
else
[Link]("Non-Positive");
}
}

Options:
A. Positive
B. Non-Positive
C. Compilation error
D. No output

Correct Answer: A or B (based on value)

142. What will be the output of the following Java program?


public class Example {
public static void main(String[] args) {
int a = 22;
if (a > 0)
[Link]("Positive");
else
[Link]("Non-Positive");
}
}

Options:
A. Positive
B. Non-Positive
C. Compilation error
D. No output

Correct Answer: A or B (based on value)

143. What will be the output of the following Java program?

public class Example {


public static void main(String[] args) {
int a = 23;
if (a > 0)
[Link]("Positive");
else
[Link]("Non-Positive");
}
}

Options:
A. Positive
B. Non-Positive
C. Compilation error
D. No output

Correct Answer: A or B (based on value)

144. What will be the output of the following Java program?


public class Example {
public static void main(String[] args) {
int a = 24;
if (a > 0)
[Link]("Positive");
else
[Link]("Non-Positive");
}
}

Options:
A. Positive
B. Non-Positive
C. Compilation error
D. No output

Correct Answer: A or B (based on value)

145. What will be the output of the following Java program?

public class Example {


public static void main(String[] args) {
int a = 25;
if (a > 0)
[Link]("Positive");
else
[Link]("Non-Positive");
}
}

Options:
A. Positive
B. Non-Positive
C. Compilation error
D. No output

Correct Answer: A or B (based on value)

146. What will be the output of the following Java program?

public class Example {


public static void main(String[] args) {
int a = 26;
if (a > 0)
[Link]("Positive");
else
[Link]("Non-Positive");
}
}

Options:
A. Positive
B. Non-Positive
C. Compilation error
D. No output

Correct Answer: A or B (based on value)

147. What will be the output of the following Java program?

public class Example {


public static void main(String[] args) {
int a = 27;
if (a > 0)
[Link]("Positive");
else
[Link]("Non-Positive");
}
}

Options:
A. Positive
B. Non-Positive
C. Compilation error
D. No output

Correct Answer: A or B (based on value)

148. What will be the output of the following Java program?

public class Example {


public static void main(String[] args) {
int a = 28;
if (a > 0)
[Link]("Positive");
else
[Link]("Non-Positive");
}
}

Options:
A. Positive
B. Non-Positive
C. Compilation error
D. No output

Correct Answer: A or B (based on value)

149. What will be the output of the following Java program?

public class Example {


public static void main(String[] args) {
int a = 29;
if (a > 0)
[Link]("Positive");
else
[Link]("Non-Positive");
}
}

Options:
A. Positive
B. Non-Positive
C. Compilation error
D. No output

Correct Answer: A or B (based on value)

150. What will be the output of the following Java program?

public class Example {


public static void main(String[] args) {
int a = 30;
if (a > 0)
[Link]("Positive");
else
[Link]("Non-Positive");
}
}

Options:
A. Positive
B. Non-Positive
C. Compilation error
D. No output

Correct Answer: A or B (based on value)

151. What will be the output of the following Java program?

public class Example151 {


public static void main(String[] args) {
int a = -3;
if(a > 2)
[Link]("High");
else if(a == 2)
[Link]("Equal");
else
[Link]("Low");
}
}

Options:
A. High
B. Equal
C. Low
D. Compilation error

Correct Answer: C. Low

152. What will be the output of the following Java program?

public class Example152 {


public static void main(String[] args) {
int a = 0;
if(a > 2)
[Link]("High");
else if(a == 2)
[Link]("Equal");
else
[Link]("Low");
}
}

Options:
A. High
B. Equal
C. Low
D. Compilation error

Correct Answer: C. Low

153. What will be the output of the following Java program?

public class Example153 {


public static void main(String[] args) {
int a = 3;
if(a > 2)
[Link]("High");
else if(a == 2)
[Link]("Equal");
else
[Link]("Low");
}
}

Options:
A. High
B. Equal
C. Low
D. Compilation error

Correct Answer: A. High

154. What will be the output of the following Java program?

public class Example154 {


public static void main(String[] args) {
int a = -5;
if(a > 2)
[Link]("High");
else if(a == 2)
[Link]("Equal");
else
[Link]("Low");
}
}

Options:
A. High
B. Equal
C. Low
D. Compilation error

Correct Answer: C. Low

155. What will be the output of the following Java program?

public class Example155 {


public static void main(String[] args) {
int a = -2;
if(a > 2)
[Link]("High");
else if(a == 2)
[Link]("Equal");
else
[Link]("Low");
}
}

Options:
A. High
B. Equal
C. Low
D. Compilation error

Correct Answer: C. Low

156. What will be the output of the following Java program?

public class Example156 {


public static void main(String[] args) {
int a = 1;
if(a > 2)
[Link]("High");
else if(a == 2)
[Link]("Equal");
else
[Link]("Low");
}
}

Options:
A. High
B. Equal
C. Low
D. Compilation error

Correct Answer: C. Low

157. What will be the output of the following Java program?

public class Example157 {


public static void main(String[] args) {
int a = 4;
if(a > 2)
[Link]("High");
else if(a == 2)
[Link]("Equal");
else
[Link]("Low");
}
}

Options:
A. High
B. Equal
C. Low
D. Compilation error

Correct Answer: A. High

158. What will be the output of the following Java program?

public class Example158 {


public static void main(String[] args) {
int a = -4;
if(a > 2)
[Link]("High");
else if(a == 2)
[Link]("Equal");
else
[Link]("Low");
}
}

Options:
A. High
B. Equal
C. Low
D. Compilation error

Correct Answer: C. Low

159. What will be the output of the following Java program?

public class Example159 {


public static void main(String[] args) {
int a = -1;
if(a > 2)
[Link]("High");
else if(a == 2)
[Link]("Equal");
else
[Link]("Low");
}
}

Options:
A. High
B. Equal
C. Low
D. Compilation error

Correct Answer: C. Low

160. What will be the output of the following Java program?

public class Example160 {


public static void main(String[] args) {
int a = 2;
if(a > 2)
[Link]("High");
else if(a == 2)
[Link]("Equal");
else
[Link]("Low");
}
}

Options:
A. High
B. Equal
C. Low
D. Compilation error

Correct Answer: B. Equal

161. What will be the output of the following Java program?

public class Example161 {


public static void main(String[] args) {
int a = 5;
if(a > 2)
[Link]("High");
else if(a == 2)
[Link]("Equal");
else
[Link]("Low");
}
}

Options:
A. High
B. Equal
C. Low
D. Compilation error

Correct Answer: A. High

162. What will be the output of the following Java program?

public class Example162 {


public static void main(String[] args) {
int a = -3;
if(a > 2)
[Link]("High");
else if(a == 2)
[Link]("Equal");
else
[Link]("Low");
}
}

Options:
A. High
B. Equal
C. Low
D. Compilation error

Correct Answer: C. Low

163. What will be the output of the following Java program?

public class Example163 {


public static void main(String[] args) {
int a = 0;
if(a > 2)
[Link]("High");
else if(a == 2)
[Link]("Equal");
else
[Link]("Low");
}
}

Options:
A. High
B. Equal
C. Low
D. Compilation error

Correct Answer: C. Low

164. What will be the output of the following Java program?

public class Example164 {


public static void main(String[] args) {
int a = 3;
if(a > 2)
[Link]("High");
else if(a == 2)
[Link]("Equal");
else
[Link]("Low");
}
}

Options:
A. High
B. Equal
C. Low
D. Compilation error

Correct Answer: A. High

165. What will be the output of the following Java program?

public class Example165 {


public static void main(String[] args) {
int a = -5;
if(a > 2)
[Link]("High");
else if(a == 2)
[Link]("Equal");
else
[Link]("Low");
}
}

Options:
A. High
B. Equal
C. Low
D. Compilation error

Correct Answer: C. Low

166. What will be the output of the following Java program?

public class Example166 {


public static void main(String[] args) {
int a = -2;
if(a > 2)
[Link]("High");
else if(a == 2)
[Link]("Equal");
else
[Link]("Low");
}
}

Options:
A. High
B. Equal
C. Low
D. Compilation error

Correct Answer: C. Low

167. What will be the output of the following Java program?

public class Example167 {


public static void main(String[] args) {
int a = 1;
if(a > 2)
[Link]("High");
else if(a == 2)
[Link]("Equal");
else
[Link]("Low");
}
}

Options:
A. High
B. Equal
C. Low
D. Compilation error

Correct Answer: C. Low

168. What will be the output of the following Java program?


public class Example168 {
public static void main(String[] args) {
int a = 4;
if(a > 2)
[Link]("High");
else if(a == 2)
[Link]("Equal");
else
[Link]("Low");
}
}

Options:
A. High
B. Equal
C. Low
D. Compilation error

Correct Answer: A. High

169. What will be the output of the following Java program?

public class Example169 {


public static void main(String[] args) {
int a = -4;
if(a > 2)
[Link]("High");
else if(a == 2)
[Link]("Equal");
else
[Link]("Low");
}
}

Options:
A. High
B. Equal
C. Low
D. Compilation error

Correct Answer: C. Low

170. What will be the output of the following Java program?


public class Example170 {
public static void main(String[] args) {
int a = -1;
if(a > 2)
[Link]("High");
else if(a == 2)
[Link]("Equal");
else
[Link]("Low");
}
}

Options:
A. High
B. Equal
C. Low
D. Compilation error

Correct Answer: C. Low

171. What will be the output of the following Java program?

public class Example171 {


public static void main(String[] args) {
int a = 2;
if(a > 2)
[Link]("High");
else if(a == 2)
[Link]("Equal");
else
[Link]("Low");
}
}

Options:
A. High
B. Equal
C. Low
D. Compilation error

Correct Answer: B. Equal

172. What will be the output of the following Java program?


public class Example172 {
public static void main(String[] args) {
int a = 5;
if(a > 2)
[Link]("High");
else if(a == 2)
[Link]("Equal");
else
[Link]("Low");
}
}

Options:
A. High
B. Equal
C. Low
D. Compilation error

Correct Answer: A. High

173. What will be the output of the following Java program?

public class Example173 {


public static void main(String[] args) {
int a = -3;
if(a > 2)
[Link]("High");
else if(a == 2)
[Link]("Equal");
else
[Link]("Low");
}
}

Options:
A. High
B. Equal
C. Low
D. Compilation error

Correct Answer: C. Low

174. What will be the output of the following Java program?


public class Example174 {
public static void main(String[] args) {
int a = 0;
if(a > 2)
[Link]("High");
else if(a == 2)
[Link]("Equal");
else
[Link]("Low");
}
}

Options:
A. High
B. Equal
C. Low
D. Compilation error

Correct Answer: C. Low

175. What will be the output of the following Java program?

public class Example175 {


public static void main(String[] args) {
int a = 3;
if(a > 2)
[Link]("High");
else if(a == 2)
[Link]("Equal");
else
[Link]("Low");
}
}

Options:
A. High
B. Equal
C. Low
D. Compilation error

Correct Answer: A. High

176. What will be the output of the following Java program?


public class Example176 {
public static void main(String[] args) {
int a = -5;
if(a > 2)
[Link]("High");
else if(a == 2)
[Link]("Equal");
else
[Link]("Low");
}
}

Options:
A. High
B. Equal
C. Low
D. Compilation error

Correct Answer: C. Low

177. What will be the output of the following Java program?

public class Example177 {


public static void main(String[] args) {
int a = -2;
if(a > 2)
[Link]("High");
else if(a == 2)
[Link]("Equal");
else
[Link]("Low");
}
}

Options:
A. High
B. Equal
C. Low
D. Compilation error

Correct Answer: C. Low

178. What will be the output of the following Java program?


public class Example178 {
public static void main(String[] args) {
int a = 1;
if(a > 2)
[Link]("High");
else if(a == 2)
[Link]("Equal");
else
[Link]("Low");
}
}

Options:
A. High
B. Equal
C. Low
D. Compilation error

Correct Answer: C. Low

179. What will be the output of the following Java program?

public class Example179 {


public static void main(String[] args) {
int a = 4;
if(a > 2)
[Link]("High");
else if(a == 2)
[Link]("Equal");
else
[Link]("Low");
}
}

Options:
A. High
B. Equal
C. Low
D. Compilation error

Correct Answer: A. High

180. What will be the output of the following Java program?


public class Example180 {
public static void main(String[] args) {
int a = -4;
if(a > 2)
[Link]("High");
else if(a == 2)
[Link]("Equal");
else
[Link]("Low");
}
}

Options:
A. High
B. Equal
C. Low
D. Compilation error

Correct Answer: C. Low

181. What will be the output of the following Java program?

public class Example181 {


public static void main(String[] args) {
int a = -1;
if(a > 2)
[Link]("High");
else if(a == 2)
[Link]("Equal");
else
[Link]("Low");
}
}

Options:
A. High
B. Equal
C. Low
D. Compilation error

Correct Answer: C. Low

182. What will be the output of the following Java program?


public class Example182 {
public static void main(String[] args) {
int a = 2;
if(a > 2)
[Link]("High");
else if(a == 2)
[Link]("Equal");
else
[Link]("Low");
}
}

Options:
A. High
B. Equal
C. Low
D. Compilation error

Correct Answer: B. Equal

183. What will be the output of the following Java program?

public class Example183 {


public static void main(String[] args) {
int a = 5;
if(a > 2)
[Link]("High");
else if(a == 2)
[Link]("Equal");
else
[Link]("Low");
}
}

Options:
A. High
B. Equal
C. Low
D. Compilation error

Correct Answer: A. High

184. What will be the output of the following Java program?


public class Example184 {
public static void main(String[] args) {
int a = -3;
if(a > 2)
[Link]("High");
else if(a == 2)
[Link]("Equal");
else
[Link]("Low");
}
}

Options:
A. High
B. Equal
C. Low
D. Compilation error

Correct Answer: C. Low

185. What will be the output of the following Java program?

public class Example185 {


public static void main(String[] args) {
int a = 0;
if(a > 2)
[Link]("High");
else if(a == 2)
[Link]("Equal");
else
[Link]("Low");
}
}

Options:
A. High
B. Equal
C. Low
D. Compilation error

Correct Answer: C. Low

186. What will be the output of the following Java program?


public class Example186 {
public static void main(String[] args) {
int a = 3;
if(a > 2)
[Link]("High");
else if(a == 2)
[Link]("Equal");
else
[Link]("Low");
}
}

Options:
A. High
B. Equal
C. Low
D. Compilation error

Correct Answer: A. High

187. What will be the output of the following Java program?

public class Example187 {


public static void main(String[] args) {
int a = -5;
if(a > 2)
[Link]("High");
else if(a == 2)
[Link]("Equal");
else
[Link]("Low");
}
}

Options:
A. High
B. Equal
C. Low
D. Compilation error

Correct Answer: C. Low

188. What will be the output of the following Java program?


public class Example188 {
public static void main(String[] args) {
int a = -2;
if(a > 2)
[Link]("High");
else if(a == 2)
[Link]("Equal");
else
[Link]("Low");
}
}

Options:
A. High
B. Equal
C. Low
D. Compilation error

Correct Answer: C. Low

189. What will be the output of the following Java program?

public class Example189 {


public static void main(String[] args) {
int a = 1;
if(a > 2)
[Link]("High");
else if(a == 2)
[Link]("Equal");
else
[Link]("Low");
}
}

Options:
A. High
B. Equal
C. Low
D. Compilation error

Correct Answer: C. Low

190. What will be the output of the following Java program?


public class Example190 {
public static void main(String[] args) {
int a = 4;
if(a > 2)
[Link]("High");
else if(a == 2)
[Link]("Equal");
else
[Link]("Low");
}
}

Options:
A. High
B. Equal
C. Low
D. Compilation error

Correct Answer: A. High

191. What will be the output of the following Java program?


public class Example191 {
public static void main(String[] args) {
int a = -4;
if(a > 2)
[Link]("High");
else if(a == 2)
[Link]("Equal");
else
[Link]("Low");
}
}

Options:
A. High
B. Equal
C. Low
D. Compilation error

Correct Answer: C. Low

192. What will be the output of the following Java program?


public class Example192 {
public static void main(String[] args) {
int a = -1;
if(a > 2)
[Link]("High");
else if(a == 2)
[Link]("Equal");
else
[Link]("Low");
}
}

Options:
A. High
B. Equal
C. Low
D. Compilation error

Correct Answer: C. Low

193. What will be the output of the following Java program?

public class Example193 {


public static void main(String[] args) {
int a = 2;
if(a > 2)
[Link]("High");
else if(a == 2)
[Link]("Equal");
else
[Link]("Low");
}
}

Options:
A. High
B. Equal
C. Low
D. Compilation error

Correct Answer: B. Equal

194. What will be the output of the following Java program?


public class Example194 {
public static void main(String[] args) {
int a = 5;
if(a > 2)
[Link]("High");
else if(a == 2)
[Link]("Equal");
else
[Link]("Low");
}
}

Options:
A. High
B. Equal
C. Low
D. Compilation error

Correct Answer: A. High

195. What will be the output of the following Java program?

public class Example195 {


public static void main(String[] args) {
int a = -3;
if(a > 2)
[Link]("High");
else if(a == 2)
[Link]("Equal");
else
[Link]("Low");
}
}

Options:
A. High
B. Equal
C. Low
D. Compilation error

Correct Answer: C. Low

196. What will be the output of the following Java program?


public class Example196 {
public static void main(String[] args) {
int a = 0;
if(a > 2)
[Link]("High");
else if(a == 2)
[Link]("Equal");
else
[Link]("Low");
}
}

Options:
A. High
B. Equal
C. Low
D. Compilation error

Correct Answer: C. Low

197. What will be the output of the following Java program?

public class Example197 {


public static void main(String[] args) {
int a = 3;
if(a > 2)
[Link]("High");
else if(a == 2)
[Link]("Equal");
else
[Link]("Low");
}
}Options:
A. High
B. Equal
C. Low
D. Compilation error

Correct Answer: A. High

198. What will be the output of the following Java program?


public class Example198 {
public static void main(String[] args) {
int a = -5;
if(a > 2)
[Link]("High");
else if(a == 2)
[Link]("Equal");
else
[Link]("Low");
}
}Options:
A. High
B. Equal
C. Low
D. Compilation error

Correct Answer: C. Low

199. What will be the output of the following Java program?

public class Example199 {


public static void main(String[] args) {
int a = -2;
if(a > 2)
[Link]("High");
else if(a == 2)
[Link]("Equal");
else
[Link]("Low");
}
}Options:
A. High
B. Equal
C. Low
D. Compilation error

Correct Answer: C. Low

200. What will be the output of the following Java program?

public class Example200 {


public static void main(String[] args) {
int a = 1;
if(a > 2)
[Link]("High");
else if(a == 2)
[Link]("Equal");
else
[Link]("Low");
}
}Options:
A. High
B. Equal
C. Low
D. Compilation error

Correct Answer: C. Low

You might also like