ExamLookup
Menu mobile
Home
Current Affairs
General Knowledge
Computer
Python
HTML
MCQ CORE JAVA QUIZ CORE JAVA MCQ Questions CORE JAVA Questions Answer for Interview
English
Hindi
Question No. -
181
Report Bug
Which among the following operators is used to check the two operands are equal or not?
Which among the following operators is used to check the two operands are equal or not?
A.
Equals
Equals
B.
=
=
C.
==
==
D.
None of these
None of these
Explanation
== (Relational Operator) is used to compare two operands are equal or not, whether '=' is used to assign the value from right side expression to left.
Question No. -
182
Report Bug
Which among the following forms of operators works with three operands?
Which among the following forms of operators works with three operands?
A.
Unary
Unary
B.
Binary
Binary
C.
Ternary
Ternary
D.
None of these
None of these
Explanation
Ternary operator takes three arguments (operands) to perform the operation. it is also known as conditional operator which used ? : symbol to represent this.
Question No. -
183
Report Bug
. Which among the following constants are used in switch-case statements?
. Which among the following constants are used in switch-case statements?
A.
char
char
B.
int
int
C.
float
float
D.
Both a and b
Both a and b
Question No. -
184
Report Bug
If a relational expression is satisfied it results in
If a relational expression is satisfied it results in
A.
true
true
B.
false
false
C.
Both a nd b
Both a nd b
D.
None of these
None of these
Question No. -
185
Report Bug
Which among the following relational operator is used to check for the equality between two quantities ?
Which among the following relational operator is used to check for the equality between two quantities ?
A.
=
=
B.
==
==
C.
equals
equals
D.
None of these
None of these
Question No. -
186
Report Bug
An if statement inside another if statement is called
An if statement inside another if statement is called
A.
Nested if
Nested if
B.
Internal if
Internal if
C.
Concentric if
Concentric if
D.
None of these
None of these
Question No. -
187
Report Bug
What is the problem called in which an optional else clause in an if–then(–else) statement results in nested conditionals being ambiguous?
What is the problem called in which an optional else clause in an if–then(–else) statement results in nested conditionals being ambiguous?
A.
Dangling if
Dangling if
B.
Dangling else
Dangling else
C.
Both a and b
Both a and b
D.
None of these
None of these
Question No. -
188
Report Bug
Which of these selection statements test only for equality?
Which of these selection statements test only for equality?
A.
if
if
B.
switch
switch
C.
if and switch
if and switch
D.
none of the mentioned
none of the mentioned
Question No. -
189
Report Bug
A type of loop that is usually used when the number of iteration is known.
A type of loop that is usually used when the number of iteration is known.
A.
for
for
B.
while
while
C.
do-while
do-while
D.
None of these
None of these
Question No. -
190
Report Bug
A type of loop when the loop executes atleast once even if the test expression evaluates to ‘true’.
A type of loop when the loop executes atleast once even if the test expression evaluates to ‘true’.
A.
for
for
B.
while
while
C.
do-while
do-while
D.
None of these
None of these
Question No. -
191
Report Bug
In while and do-while loops, a statement causes control to be transferred directly to the conditional expression that controls the loop.
In while and do-while loops, a statement causes control to be transferred directly to the conditional expression that controls the loop.
A.
break
break
B.
pause
pause
C.
start
start
D.
continue
continue
Question No. -
192
Report Bug
By using you can force immediate termination of loop, bypassing the conditional expression and any remaining code in the body of the loop.
By using you can force immediate termination of loop, bypassing the conditional expression and any remaining code in the body of the loop.
A.
switch
switch
B.
break
break
C.
continue
continue
D.
default
default
Question No. -
193
Report Bug
What is an infinite loop?
What is an infinite loop?
A.
A loop that functions infinitely well
A loop that functions infinitely well
B.
A loop that runs forever
A loop that runs forever
C.
A loop that never starts
A loop that never starts
D.
A loop that will never function
A loop that will never function
Question No. -
194
Report Bug
Which of these jump statements can skip processing remainder of code in its body for a particular iteration?
Which of these jump statements can skip processing remainder of code in its body for a particular iteration?
A.
break
break
B.
return
return
C.
exit
exit
D.
continue
continue
Question No. -
195
Report Bug
Which looping process checks the test condition at the end of the loop?
Which looping process checks the test condition at the end of the loop?
A.
for
for
B.
while
while
C.
do-while
do-while
D.
no looping process checks the test condition at the end
no looping process checks the test condition at the end
Question No. -
196
Report Bug
What’s wrong? for (int k = 2, k <= 12, k++)
What’s wrong? for (int k = 2, k <= 12, k++)
A.
the increment should always be ++k
the increment should always be ++k
B.
the variable must always be the letter i when using a for loop
the variable must always be the letter i when using a for loop
C.
there should be a semicolon at the end of the statement
there should be a semicolon at the end of the statement
D.
the commas should be semicolons
the commas should be semicolons
Question No. -
197
Report Bug
What’s wrong? while( (i < 10) && (i > 24))
What’s wrong? while( (i < 10) && (i > 24))
A.
the logical operator && cannot be used in a test condition
the logical operator && cannot be used in a test condition
B.
the while loop is an exit-condition loop
the while loop is an exit-condition loop
C.
the test condition is always false
the test condition is always false
D.
the test condition is always true
the test condition is always true
Question No. -
198
Report Bug
In a group of nested loops, which loop is executed the most number of times?
In a group of nested loops, which loop is executed the most number of times?
A.
the outermost loop
the outermost loop
B.
the innermost loop
the innermost loop
C.
all loops are executed the same number of times
all loops are executed the same number of times
D.
cannot be determined without knowing the size of the loops
cannot be determined without knowing the size of the loops
Question No. -
199
Report Bug
Which among the following Scanner methods allows us to input a number with a decimal point?
Which among the following Scanner methods allows us to input a number with a decimal point?
A.
nextInt()
nextInt()
B.
nextFloat()
nextFloat()
C.
nextDecimal()
nextDecimal()
D.
nextPoint()
nextPoint()
Question No. -
200
Report Bug
Which among the following package is imported by default:
Which among the following package is imported by default:
A.
java.lang
java.lang
B.
java.util
java.util
C.
Both a and b
Both a and b
D.
None of these
None of these
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
CCC Online Test 2021
CCC Practice Test Hindi
Python Programming Tutorials
Best Computer Training Institute in Prayagraj (Allahabad)
O Level NIELIT Study material and Quiz
Bank SSC Railway TET UPTET Question Bank
career counselling in allahabad
Sarkari Exam Quiz
Website development Company in Allahabad