Re: shuffle loses/duplicates objects in LinkedList

From: Stefan Schulz (terra_at_spacetime.de)
Date: 01/19/05

  • Next message: Adrian Collister: "Re: shuffle loses/duplicates objects in LinkedList"
    Date: Wed, 19 Jan 2005 21:01:09 +0100
    
    

    On Wed, 19 Jan 2005 19:51:55 +0000, Adrian Collister wrote:
     
    > // Simple Class which just contains an int.
    > public class Int
    > implements Comparable {

    This should be a static class. javac rightly complains about that.

    0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
    12 1 15 3 10 14 2 5 13 18 6 8 11 17 19 4 0 7 16 9
    0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19

    Other then what i mentioned above, the program works as expected. As a
    wild guess, maybe the gnu compiler provides a class called Int internally,
    and this class has a very strange behaviour. Take a look at what
    System.out.println(Int.class) prints on your box.

    -- 
    In pioneer days they used oxen for heavy pulling, and when one ox
    couldn't budge a log, they didn't try to grow a larger ox. We shouldn't
    be trying for bigger computers, but for more systems of computers.
               --- Rear Admiral Grace Murray Hopper
    

  • Next message: Adrian Collister: "Re: shuffle loses/duplicates objects in LinkedList"