Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.java.help > #1160

Reverse sorting an array

From Fred <albert.xtheunknown0@gmail.com>
Newsgroups comp.lang.java.help
Subject Reverse sorting an array
Date 2011-09-30 04:03 -0700
Organization http://groups.google.com
Message-ID <8ea2add1-ce9c-423b-bdb8-92c461cf9c6d@5g2000yqo.googlegroups.com> (permalink)

Show all headers | View raw


Hello,

Thanks to those replied to the other thread I started - guess I was
being too 'clever' with using methods.

Can you please tell me why this code won't _compile_?

import java.util.*;

class InputCounter {
    public static void main(String[] args) {
	final int MAX_NUMBERS = 50;
	int[] array = new int[MAX_NUMBERS];
	Arrays.sort(array, Collections.reverseOrder());
    }
}

TIA,
Fred

Back to comp.lang.java.help | Previous | NextNext in thread | Find similar


Thread

Reverse sorting an array Fred <albert.xtheunknown0@gmail.com> - 2011-09-30 04:03 -0700
  Re: Reverse sorting an array Eric Sosman <esosman@ieee-dot-org.invalid> - 2011-09-30 07:50 -0400
    Re: Reverse sorting an array Fred <albert.xtheunknown0@gmail.com> - 2011-09-30 15:24 -0700
      Re: Reverse sorting an array Eric Sosman <esosman@ieee-dot-org.invalid> - 2011-09-30 20:50 -0400
        Re: Reverse sorting an array Roedy Green <see_website@mindprod.com.invalid> - 2011-10-01 19:38 -0700
          Re: Reverse sorting an array Eric Sosman <esosman@ieee-dot-org.invalid> - 2011-10-01 22:58 -0400
            Re: Reverse sorting an array Lew <lewbloch@gmail.com> - 2011-10-01 20:21 -0700
    Re: Reverse sorting an array Fred <albert.xtheunknown0@gmail.com> - 2011-09-30 15:31 -0700
      Re: Reverse sorting an array Roedy Green <see_website@mindprod.com.invalid> - 2011-09-30 15:45 -0700
        Re: Reverse sorting an array Fred <albert.xtheunknown0@gmail.com> - 2011-09-30 16:27 -0700
          Re: Reverse sorting an array Patricia Shanahan <pats@acm.org> - 2011-09-30 16:58 -0700
    Re: Reverse sorting an array Roedy Green <see_website@mindprod.com.invalid> - 2011-09-30 15:43 -0700
      Re: Reverse sorting an array Eric Sosman <esosman@ieee-dot-org.invalid> - 2011-09-30 20:57 -0400
  Re: Reverse sorting an array Roedy Green <see_website@mindprod.com.invalid> - 2011-09-30 04:58 -0700
    What qualifies as a constant ? (Was: Reverse sorting an array) Mayeul <mayeul.marguet@free.fr> - 2011-09-30 14:45 +0200
      Re: What qualifies as a constant ? (Was: Reverse sorting an array) Lew <lewbloch@gmail.com> - 2011-09-30 07:39 -0700
        Re: What qualifies as a constant ? (Was: Reverse sorting an array) Mayeul <mayeul.marguet@free.fr> - 2011-09-30 17:15 +0200
          Re: What qualifies as a constant ? (Was: Reverse sorting an array) Lew <lewbloch@gmail.com> - 2011-09-30 08:42 -0700

csiph-web