Top 1000+ Java Interview Questions and Answers Pdf - 3

Question: 11

What is the difference between a break statement and a continue statement?

A break statement results in the termination of the statement to which it applies (switch, for, do or while).

A continue statement is used to end the current loop iteration and return control to the loop statement.

Question: 12

What are the secondary access modifiers?

Static, abstract, final, transient and volatile

Question: 13

What is shadowing?

Declaring the same variables of parent class in the subclass is known as shadowing.

Question: 14

Can an abstract class be final?

An abstract class may not be declared as final.

Question: 15

What modifiers can be used with a local inner class?

A local inner class may be final or abstract.

Related Questions