1 Functional Interface Number Abstract Methods B Used Target Lambda Expression C Implement Q37222415

1. 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

2. 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 of generic type T (i.e.,EClass<T>[] genArray = newEClass<T>{10};)

C) constructors have to be declared as: genericClass<T>(zero or more parameter list…)

D) generic object initializations are allowed (i.e.,EClass<T> ref = newEClass<T>(var))

3. The following piece of code:

ArrayList<int testList- new ArrayListint>(O testList.add(1); testList.add( -2); int sum1 for (Integer item testList) sum item

a)

OR
OR

Leave a Comment

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