Question: In java Q2 Iterable Which of the following interfaces is required by Java to use a data structure in an enhanced for loop: 1. List
In java
Q2 Iterable
Which of the following interfaces is required by Java to use a data structure in an enhanced for loop:
1. List
2. Iterator
3. Iterable
4. Collection
Q3 Iterable
Which of the following interfaces is returned by an Iterable's iterator() method:
1. List
2. Iterator
3. Iterable
4. Collection
Q4 Iterator
Which is the proper way to implement next() for an Iterator:
1. return valuesave value,
2. update to next element, return saved value
3. update to next element, return value
4. save value, return saved value
5. return value, update to next element
Q5 Types
1 Point
interface Function{ R apply(T t); }
Which of the following are true about the Function interface's type parameters:
1. T is the type of the input to the function
2. T is the type of the result of the function
3. R is the type of the input to the function
4. R is the type of the result of the function
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
