What is local class? Give example.
Answers
Answered by
0
A local class is defined within a block of a statement , like a method / function.It is different than inner / nested classes in the aspect that inner classes are defined within the scope of the enclosing class, whereas, local classes operate within the scope of the enclosing method.Hence, local classes can access local variables defined in the container method, apart from accessing all members of the enclosing class. For Example = Validates two phone numbers... Plzzzz mark my answer as brain list.
Similar questions
Computer Science,
7 months ago
English,
7 months ago
Computer Science,
7 months ago
Chemistry,
1 year ago
English,
1 year ago
English,
1 year ago