method

A collection of 1 posts

A Java geek
  • Me
  • Books
  • Speaking
  • Mentions
  • Focus
Feb 26, 2017 class method design

A use-case for local class declaration

One of the first things one learns when starting with Java development is how to declare a class into its own file. Potential later stages include: Declaring multiple classes into the same file - with at most one of them publicDeclaring static nested classes or inner classesDeclaring anonymous (inner) classes But this doesn’t stop there: the JLS is a trove full of surprises. I recently learned classes can be declared inside any block, including methods. This is called local class declarat

Nicolas Fränkel
A Java geek © 2008-2025
v. 8fec5fd4f9d84998a5ceaaf8b7e88a6dd8f552b9/11943223098
Latest Posts