linked list queue headaches

I'm trying to set up a queue implemented by a linked list. I don't understand how to access the private linked list methods. I've tried setting up another instance of a class of the queue called "set" and then calling the methods by set.queue.whatevermethod and it's not working ....help

import java.util.LinkedList;

publicclass AQueue3{

private LinkedList queue =new LinkedList();

publicvoid enqueue(Object s){

// Add an item to end of queue.

queue.addLast(s);//add what goes here

}

public Object dequeue(){

//remove an item from the front

return queue.removeFirst();//add what goes here

}

publicboolean isEmpty(){

// Test if the queue is empty.

return queue.isEmpty();

}

AQueue3 set =new AQueue3();

publicstaticvoid main(String[] args){

set.queue.enqueue("It's about time you got this taken care of!");

queue.enqueue("Zagaton!");

queue.enqueue("Care Bear.");

queue.dequeue();

queue.dequeue();

queue.enqueue("This is another attempt at the impossible.");

}

}// end class Queue

Any help is appreciated...dansing

[2284 byte] By [dansinga] at [2007-11-27 7:40:47]
# 1
What isn't working? What private methods do you think you need to call? And what's wrong with the existing implementations of java.util.Queue?
ejpa at 2007-7-12 19:21:20 > top of Java-index,Java Essentials,New To Java...
# 2

Well, at first it didn't compile. Now I've figured out that I needed to create another instance of the class "inside" main and then reference the methods. This code is working and compiling but I need to figure out how to look at each link to see whats in it...

public static void main(String[] args) {

AQueue3 myque = new AQueue3();

myque.enqueue("It's about time you got this taken care of!");

myque.enqueue("Zagaton!");

myque.enqueue("Care Bear.");

myque.dequeue();

myque.dequeue();

myque.enqueue("This is another attempt at the impossible.");

}

dansinga at 2007-7-12 19:21:20 > top of Java-index,Java Essentials,New To Java...
# 3
AQueue3 set = new AQueue3();Declaring this as a member of the AQueue3 class makes no sense. I'm surprised it didn't overflow the stack actually.
ejpa at 2007-7-12 19:21:20 > top of Java-index,Java Essentials,New To Java...