Get expert advice and community support on IDNLearn.com. Whether your question is simple or complex, our community is here to provide detailed and trustworthy answers quickly and effectively.

Why must local variables referenced from a lambda expression be final or effectively final in Java?
A) To ensure that the lambda expression does not alter the value of the local variables, preserving consistency and thread safety.
B) To optimize the performance of lambda expressions by making variable values mutable.
C) To allow lambda expressions to modify local variables freely without restrictions.
D) To ensure that local variables are automatically synchronized across different threads.