title: How to let java check whether people are friends or not?
body: <p>How do I check whether people are friends or not.</p>
  
  <p>The input would look like</p>
  
  <pre><code>Hans Peter
  Thomas Peter
  Hans Thomas
  Kate Thomas
  </code></pre>
  
  <p>Then I will check if Hans Thomas and Peter are friends where the expected output would be "yes" </p>
  
  <p>My idea is to create a bufferedreader that reads a line and a stringtokenizer that takes the inputs from the bufferedreader and puts them in an Arraylist.</p>