I have a Map<String, String>
I want to stream all the values in a List<String> I call keys.
How can I get this to return the Values from the map?
Map like this:
("Frank", "Car")
("Bob", "Bike")
("Jim", "Truck")
List of keys i give it:
["Frank","Jim"]
Expected result:
["Car","Truck"]
I tried this but it just prints the keys not the values.
keys.stream()
.filter(map::containskey)
.collect(Collectors.toList())