Multiple Choice Java 1 Anonymous Class Defined New Public Attributes Globally Accessible B Q37115846

Multiple Choice Java

1. An anonymous class can be defined…

a) With new public attributes that are globally accessible.

b) With methods that over-ride methods.

c) With more then one instance

d) Only when the parent class has a default constructor.

2. A functional interface…

a) can have any number of abstract methods

b) can be used as a target for a lambda expression

c) can implement any number of methods other than the ‘default’and ‘static’ types

d) requires the @AbstractInterface annotation so the compilercan recognize it

3. In a generic class genericClass<T>…

a) inner generic classes with the type parameter T are notallowed (i.e., innerClass<T>)

b) it is possible to instantiate arrays

OR
OR

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.