Yes that approach sounds right.
Who wrote the code for the Node class with its compareTo method?
You should read the API doc for the PriorityQueue class to see how it orders its contents.
Type: Posts; User: Norm
Yes that approach sounds right.
Who wrote the code for the Node class with its compareTo method?
You should read the API doc for the PriorityQueue class to see how it orders its contents.
Where do you use the Node class?
By use I mean something like this:
Node aNode = new Node(.....); // create a node
// then do something with aNode
What do you put in the PriorityQueue?
And what about the first two questions:
Where do you use the Node class?
What type of object is added to the PriorityQueue object?
Where do you use the Node class?
What type of object is added to the PriorityQueue object?
What should the output look like? Now its a list of the letters of the alphabet.
Can you show what the correct output would be for your input file?
To make your code easier to test, I changed it thus:
String Input = "this is a text file go go gooberry\nplease...