Given the code fragment:
What is the result?
A. Hello : Jim Hello : John Hello : Jeff
B. Jim John Jeff
C. The program prints nothing.
D. A compilation error occurs.
Given the code fragment:
What is the result?
A. Hello : Jim Hello : John Hello : Jeff
B. Jim John Jeff
C. The program prints nothing.
D. A compilation error occurs.
class Testing {
public static void main (String[] args){
List nL = Arrays.asList(“Jim “, “John “, “Jeff”+”\n”);
Function funVal = s -> “Hello : “.concat(s); nL.stream()
.map(funVal)
.forEach(s-> System.out.print (s));
}
}
output:
Hello : Jim Hello : John Hello : Jeff
A tested
C
C
There is no Terminal
c