Prev Next

Java / Local Variables

Difference between final and effectively final in Java.

The keyword final ensures that the variable is initialized only once and cannot be altered. Reinitializing would issue compilation errors.

Any variable that is initialized only once and not marked as final is known as effectively final. This variable when marked final will not issue any compilation errors.

More Related questions...

Show more question and Answers...


Comments & Discussions