Core java interview Questions You'll Most Likely Be Asked (Second Edition)


Download 1.52 Mb.
Pdf ko'rish
bet159/171
Sana07.01.2023
Hajmi1.52 Mb.
#1081886
1   ...   155   156   157   158   159   160   161   162   ...   171
Bog'liq
Core JAVA Interview Questions Youll M...

Operators
In the code snippet below, which lines will cause a compilation
error and why?
What will be the output of the following code and why?
Explain the operator available for string concatenation with a
code sample.
What will be the output of the following code?
Explain the % operator.
What will be the output of the following code?


042.
043.
044.
045.
046.
047.
048.
049.
050.
051.
052.
053.
054.
055.
056.
057.
058.
059.
060.
Explain what happens when the following code is compiled
and executed?
Will the below code compile? If so, what will be the output?
What will be the output of the following code?
What will be the output of the following code and why?
What will be output of the following code snippet? Explain the
reasons.
Explain the increment and decrement operators.
Explain the instanceOf operator.
Explain the ternary operator with a code sample.
Control Statements
Name the decision statements used in Java.
What are the looping constructs in Java?
Explain the syntax of the if–else statement with an example.
Which of the following lines of code will compile and which will
cause an error?
What would be the output if boolA is false and boolB is true?
What will be the output of the following program?
What happens when you execute the code below? If it
compiles, what will be the output?
What is the use of “break” and “continue” statements?
What happens when you compile and execute the code
below? What will be the output?
What happens when you compile and execute the code
below? What will be the output?
What happens when you compile and execute the code
below? What will be the output?


061.
062.
063.
064.
065.
066.
067.
068.
069.
070.
071.
072.
073.
074.
075.
076.
077.
078.
079.
What happens when you compile and execute the code
below? What will be the output?
Give some examples of “for–each” loop.
What will be the output of the following code?
What will happen when you execute the code below? If it
compiles fine, what will be the output?

Download 1.52 Mb.

Do'stlaringiz bilan baham:
1   ...   155   156   157   158   159   160   161   162   ...   171




Ma'lumotlar bazasi mualliflik huquqi bilan himoyalangan ©fayllar.org 2024
ma'muriyatiga murojaat qiling