Stream Filter of 1 list based on another list
<p>I am posting my query after having searched in this forum &amp; google, but was unable to resolve the same. 
eg: <a href="https://stackoverflow.com/questions/31808893/filter-elements-from-a-list-based-on-another-list">Link1</a> <a href="https://stackoverflow.com/questions/6561825/how-to-filter-a-list-based-on-the-content-of-another-list-of-a-different-type">Link2</a> <a href="https://stackoverflow.com/questions/26170264/java-8-lambda-filter-collection-by-another-collection">Link3</a></p>

<p>I am trying to filter List 2 (multi column) based on the values in List 1.</p>

<pre><code>List1:
 - [Datsun]
 - [Volvo]
 - [BMW]
 - [Mercedes]

List2: 
 - [1-Jun-1995, Audi, 25.3, 500.4, 300]
 - [7-Apr-1996, BMW, 35.3, 250.2, 500]
 - [3-May-1996, Porsche, 45.3, 750.8, 200]
 - [2-Nov-1998, Volvo, 75.3, 150.2, 100]
 - [7-Dec-1999, BMW, 95.3, 850.2, 900]

expected o/p:
 - [7-Apr-1996, BMW, 35.3, 250.2, 500]
 - [2-Nov-1998, Volvo, 75.3, 150.2, 100]
 - [7-Dec-1999, BMW, 95.3, 850.2, 900]
</code></pre>

<p><strong><em>Code</em></strong></p>

<pre><code>// List 1 in above eg
List&lt;dataCarName&gt; listCarName = new ArrayList&lt;&gt;(); 
// List 2 in above eg
List&lt;dataCar&gt; listCar = new ArrayList&lt;&gt;(); 

// Values to the 2 lists are populated from excel

List&lt;dataCar&gt; listOutput = listCar.stream().filter(e -&gt; e.getName().contains("BMW")).collect(Collectors.toList());
</code></pre>

<p>In the above code if I provide a specific value I can filter, but not sure how to check if Car Name in List 2 exits in List 1.</p>

<p>Hope the issue I face is clear, await guidance (Am still relatively new to Java, hence forgive if the above query is very basic).</p>

<p><strong><em>Edit</em></strong>
I believe the link-3 provided above should resolve, but in my case it is not working. Maybe because the values in list-1 are populated as
org.gradle04.Main.Cars.dataCarName@4148db48 .. etc.
I am able to get the value in human readable format only when I do a forEach on List 1 by calling the getName method.</p>