Meaning if I ommit the access modifier for members of local classes, can the class declaring method access the members? And who else exactly?
I'm talking about local classes, that are classes defined inside a method
THEREFORE THIS IS NOT A DUPLICATE
Meaning if I ommit the access modifier for members of local classes, can the class declaring method access the members? And who else exactly?
I'm talking about local classes, that are classes defined inside a method
THEREFORE THIS IS NOT A DUPLICATE
 
    
    Local classes cannot be declared public, protected, private, or static. These modifiers are for members of classes; they are not allowed with local variable declarations or local class declarations.
*Meaning if I ommit the access modifier for members of local classes, can the class declaring method access the members?*
No the class declaring the method cannot access the local class members. A local class is visible only within the block that defines it; it can never be used outside that block.
 
    
    The default modifier is package level modifier. Accessable inside the package.
