Search:

Type: Posts; User: Norm

Search: Search took 0.11 seconds.

  1. Replies
    9
    Views
    5,179

    Re: generate priority queue from hashmap help

    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.
  2. Replies
    9
    Views
    5,179

    Re: generate priority queue from hashmap help

    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?
  3. Replies
    9
    Views
    5,179

    Re: generate priority queue from hashmap help

    And what about the first two questions:
    Where do you use the Node class?
    What type of object is added to the PriorityQueue object?
  4. Replies
    9
    Views
    5,179

    Re: generate priority queue from hashmap help

    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.
  5. Replies
    9
    Views
    5,179

    Re: generate priority queue from hashmap help

    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...
Results 1 to 5 of 5