Which is true about an anonymous inner class it can extend exactly one class and implement exactly one interface it can extend exactly one class and?

Ans: C Explanation: Option C is correct because the syntax of an anonymous inner class allows for only one named type after the new , and that type must be either a single interface (in which case the anonymous class implements that one interface) or a single class (in which case the anonymous…25 Ara 2018

Read more

Is a local class an inner class?

Local classes are similar to inner classes because they cannot define or declare any static members . Local classes in static methods, such as the class PhoneNumber , which is defined in the static method validatePhoneNumber , can only refer to static members of the enclosing class.

Read more