Compile : No , Error at line 8
Reason : Any number starting with 0 is an octal number
Next Question >>
Is the code compiles ? If yes then what will be the output ?
Answer >>
Compile : No , Error at line 6
Reason : Type mismatch , can not convert from int to boolean
Next Question >>
Is the code compiles ? If yes then what will be the output ?
Answer >>
Compile : Yes
Output : try
catch
finally
Next Question >>
Is the code compiles ? If yes then what will be the output ?
Answer >>
Compile : Yes
Output : try
finally
Next Question >>
Is the code compiles ? If yes then what will be the output ?
Answer >>
Compile : Yes
Output : Completed Counting . . . . . .
Waiting to get End . . . . . ( Infinite loop )
Next Question >>
Is the code compiles ? If yes then what will be the output ?
Answer >>
Compile : No , Error at line 12
Reason : Local variable x has not been initialized
Next Question >>
Is the code compiles ? If yes then what will be the output ?
Answer >>
Compile : Yes
Output : abcd abc false
abcd abcd true
Here we only discuss the technical questions along with the answer .
Read Also : Top 25 Most frequently asked java questions
Click here for Answers Explanation
Reason : Any number starting with 0 is an octal number
Next Question >>
Is the code compiles ? If yes then what will be the output ?
Answer >>
Compile : No , Error at line 6
Reason : Type mismatch , can not convert from int to boolean
Next Question >>
Is the code compiles ? If yes then what will be the output ?
Answer >>
Compile : Yes
Output : try
catch
finally
Next Question >>
Is the code compiles ? If yes then what will be the output ?
Answer >>
Compile : Yes
Output : try
finally
Next Question >>
Is the code compiles ? If yes then what will be the output ?
Answer >>
Compile : Yes
Output : Completed Counting . . . . . .
Waiting to get End . . . . . ( Infinite loop )
Next Question >>
Is the code compiles ? If yes then what will be the output ?
Answer >>
Compile : No , Error at line 12
Reason : Local variable x has not been initialized
Next Question >>
Is the code compiles ? If yes then what will be the output ?
Answer >>
Compile : Yes
Output : abcd abc false
abcd abcd true
Here we only discuss the technical questions along with the answer .
Read Also : Top 25 Most frequently asked java questions
Click here for Answers Explanation