title: queue of array elements in java
body: <p>i am a beginner in java and i have an exercise for homework!i want to find the shortest path in a map! i will do the bfs algorithm! i read the map and i put the chars in a array!After that i want to do bfs in the array so i want to make a queue of elements with two fields, for example a queue that every element is an array [2], in order to put in the first field the array position of the element and in the other one the cost to get there!Any ideas how to do this??Thank you a lot for your time and your help!
  i tried this but it didn't work!</p>
  
  <pre><code>    Queue  &lt;int []&gt; queue = new LinkedList &lt;int []&gt; ();
      int [] start = {thesi,0};
  </code></pre>