How do I compare two lists in Java and print the result based on each combination?
<p>I want to compute ticket price between each stations based on the price matrix:</p>

<pre><code>        a  b c 

  a     0  2 3
  b     4  0 1
  c     7  2 0
</code></pre>

<p>Example:  <code>from a to b</code> print <code>2</code> or <code>from c to a</code> print <code>7</code> based on values in the above price matrix.</p>

<p>Here it is, I want to print the railway ticket fare based on the two station lists: "from:" list and "to:" list. I want to print fare after comparing. There is a fixed fare for each combination. For example station a to station b, the fare is 10. For any one station to other station there is a fixed fare.</p>
