simple enqueue action, not so simple
<p>In my application is an exe class in a Java LinkedList queue data structure.</p>

<p>For some reason enqueue can't deal with the Student type. Everything seems fine except that I get this error:</p>

<pre><code>The method enqueue(String) in the type LinkedQueue&lt;String&gt; is not 
applicable for the arguments (Student)
</code></pre>

<p>Here's the code. I've tried re-arranging things, but I'm really at a loss, I can't change the Queue class because its supposed to be generic.</p>

<pre><code>String result;
LinkedQueue&lt;String&gt; queue = new LinkedQueue&lt;String&gt;();
Student []studentGroup = {
    new Student(new String("data")),
    new Student(new String("data")),
    new Student(new String("data")),
    new Student(new String("data")),
    new Student(new String("data"))};

for (int k = 0; k&lt;studentGroup.length; k++ ) {
    queue.enqueue(studentGroup[k]);
}


}
}
</code></pre>

<p>Edit: was in the middle of editing it mate, but thanks. And yes its missing a main method and class name which is intentional since alot of people a googling for this code for an assignment.</p>

<p>So, I'm dubious about setting LinkedQueue as , because I'll have to do a dequeue and some other stuff and don't want to instantiate more than I have to. </p>

<p>But yea, I've been wracking my head over something so obvious, but then I've been awake for 34 hours. Thanks for pointing it out guys, it's much appreciated.</p>
