Random number challenge

Jacob Fugal lukfugl at gmail.com
Mon Jun 30 21:16:24 MDT 2008


On Mon, Jun 30, 2008 at 5:50 PM, Brendan Curran
<brendan.curran at gmail.com> wrote:
> K, just for kicks here's the Java version. Nothing to import....
>
> int max = /** insert max number here **/
> Random generator = new Random();
> int rand = generator.nextInt(max);
>
>
> done.

Done?

Didn't you forget:

	public class MyClass {
		public static void main(String[] args) {
			...
			System.out.println(rand);
		}
	}

;)

Jacob Fugal



More information about the PLUG mailing list