Java ProgrammingPrograming & IT Mcqs 100+ MCQ & Answer Java programming | page-10 |Computer Engineering MCQ And Answer January 27, 2025 DSN MARATHI 91. What is the other name for a Question Mark – Colon (?:) operator in Java? A. Special Relational operator B. Special Logical Operator C. Ternary Operator D. None Answer Option : C 92. Java Ternary operator is sometimes called ____. A. Relational Operator B. Conditional Operator C. Logical Operator D. None Answer Option : B 93. The condition of a Java Ternary operator should evaluate to ___. A. 1 or 0 B. true or false C. TRUE or FALSE D. None Answer Option : B 94. Java Ternary operator can be used with ___. A. if-else statements B. while, do while loops C. for loop, enhanced for loop D. All Answer Option : D 95. A java Ternary operator has priority less than ___. A. Relational operators B. Arithmetic operators C. Logical and bitwise operators D. All Answer Option : D 96. Java assignment operator has priority more than ___. A. Assignment and Lambda operator B. Logical and bitwise operator C. Arithmetic operators D. Logical operators Answer Option : A 97. The True Part Expression of a Java conditional operator or Ternary operator ____ return a value. A. may B. can C. must D. None Answer Option : C 98. Choose a possible error with a Ternary operator while compiling a Java program. A. The left-hand side of an assignment must be a variable. B. void is an invalid type for the variable C. Type mismatch: cannot convert from void to int D. All Answer Option : D 99. An IF-ELSE statement is also called ___. A. Branching statement B. Control statement C. Block statements D. All Answer Option : D 100. An IF or ELSE IF statement accepts ___ as input before branching. A. boolean B. int C. float D. char Answer Option : A
91. What is the other name for a Question Mark – Colon (?:) operator in Java? A. Special Relational operator B. Special Logical Operator C. Ternary Operator D. None Answer Option : C
92. Java Ternary operator is sometimes called ____. A. Relational Operator B. Conditional Operator C. Logical Operator D. None Answer Option : B
93. The condition of a Java Ternary operator should evaluate to ___. A. 1 or 0 B. true or false C. TRUE or FALSE D. None Answer Option : B
94. Java Ternary operator can be used with ___. A. if-else statements B. while, do while loops C. for loop, enhanced for loop D. All Answer Option : D
95. A java Ternary operator has priority less than ___. A. Relational operators B. Arithmetic operators C. Logical and bitwise operators D. All Answer Option : D
96. Java assignment operator has priority more than ___. A. Assignment and Lambda operator B. Logical and bitwise operator C. Arithmetic operators D. Logical operators Answer Option : A
97. The True Part Expression of a Java conditional operator or Ternary operator ____ return a value. A. may B. can C. must D. None Answer Option : C
98. Choose a possible error with a Ternary operator while compiling a Java program. A. The left-hand side of an assignment must be a variable. B. void is an invalid type for the variable C. Type mismatch: cannot convert from void to int D. All Answer Option : D
99. An IF-ELSE statement is also called ___. A. Branching statement B. Control statement C. Block statements D. All Answer Option : D
100. An IF or ELSE IF statement accepts ___ as input before branching. A. boolean B. int C. float D. char Answer Option : A