Final Variable: a variable which is declared with the final keyword cannot be modified and will have the same value throughout the application.
Effective Final Variable: a variable which is not explicitly declared with a final keyword but never gets modified throughout the application, although it's not declared as final since the value has not been modified hence compiler treats them just like final and can be termed as Effective Final.
The main reason behind the requirement of final and Effective Final is Lambda Expressions can use local variables defined outside. compiler passes the variable in lambda using pass by value, lambda tries to keep the value as constant because changing the value of a variable with each iteration might result in an incorrect result.
The process of keeping local variables is known as capturing lambdas.
Lambda can capture static variables, instance variables, and local variables, but only local variables must be final or effectively final.
local variables are saved in the stack, each thread has its own call stack, and no thread can access another thread stack, where are static and instance variables are stored on the heap which is shared among all threads.
Check this Variable used in Lambda Expression Should be Final or Effectively Final