title: Check if value exists in List<List<objects>> in java?
body: <p>I want to check if an objects exists in the <code>List&lt;List&lt;objects&gt;&gt;</code> and return the index of <code>List&lt;&lt;&gt;&gt;</code> if the object is found.</p>
  
  <p>Eg:</p>
  
  <pre><code>List&lt;List&lt;Integer&gt;&gt; listOfLists = new ArrayList&lt;&gt;(); 
  List&lt;Integer&gt; listOne = new ArrayList&lt;&gt;();
  listOne.add(1);
  listOne.add(9);
  listOfLists.add(listOne);
  List&lt;Integer&gt; listTwo = new ArrayList&lt;&gt;();
  listTwo.add(5);
  listTwo.add(7);
  listOfLists.add(listTwo);
  </code></pre>
  
  <p>now I want to find if 9 exists, if so return it's index in the listoflists which is '0'
  And should there be any modifications done for it to work with custom objects?</p>