Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

9
  • 32
    +1: This is an important use case, and the only time when you need it. (The rest of the time it's just a matter of what's convenient for helping the programmer.) Commented Nov 12, 2010 at 9:22
  • 3
    May I ask the reasoning behind this ? Commented Jan 18, 2014 at 15:42
  • 25
    No more necessary with Java 8. Commented Nov 5, 2015 at 7:57
  • 3
    @simgineer read here: stackoverflow.com/questions/28408109/… Commented Feb 17, 2018 at 8:54
  • 6
    @AmitParashar True, but Java 8 is just saving you from having to use the keyword "final" every time you have to use the variable in an inner class... The reality is that the compiler is merely making the finality implicit, you still need the variable to be effectively final... So, you still get a compile time error in case you try to assign to it later! Java 8: SNEAK 100 :) Commented Apr 9, 2019 at 18:33