Question 106 of 130 from exam 1Z0-809: Java SE 8 Programmer II

Question 106 of 130 from exam 1Z0-809: Java SE 8 Programmer II

Question

Given:

public class Vehicle {
int vid;
String vName;
public Vehicle(int vIdarg, String
this.vId = vIdargs
this.vName = vNameArg;
}
public int getvid() { return vid;
public string getvName() { return
public String toString() {
return vName;
,
List<Vehicle> vehicle = Arrays.asbist (
new Vehicle(2, "Car"),
new Vehicle(3, "Bike"),
new Vehicle(1, "Truck"));
vehicle.stream()
// line nl
. forEach (System. out

print);

Which two code fragments, when inserted at line n1 independently, enable the code to print TruckCarBike?

Answers

Explanations

Click on the arrows to vote for the correct answer

A. B. C. D. E.

DE.