P
pieter_hordijk
Hi all,
this is my first post ever in a ng so bare with me.
As a school assignment I need to create the game Lingo.
Untill now it all goes well.
But now i found i (simple) problem.
I have an array of 25 integers and I want to shuffle the integers in
the array.
Offcourse i've searched NG's before I came here to ask, but all with
little result.
I know most of you people won't help (in a way of giving the code) to
students, so that they won't learn anything from it.
But i've come so far (I think ) now, that im asking you please tell
what is wrong with following code:
// for Collections
import java.util.*;
public class Ballen extends JFrame {
// the array
private static int[] Ballenbak =
{
// even getallen
2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30, 32, 34, 36,
38, 40,
42, 44, 46, 48, 50
};
// shuffle integers
Collections.shuffle(Ballenbak);
}
The error I get is the following:
cannot find symbol; symbol : method shuffle(int[]), location: class
java.util.Collections
Can someone please tell me what I'm doing wrong?
Thanks in advance.
this is my first post ever in a ng so bare with me.
As a school assignment I need to create the game Lingo.
Untill now it all goes well.
But now i found i (simple) problem.
I have an array of 25 integers and I want to shuffle the integers in
the array.
Offcourse i've searched NG's before I came here to ask, but all with
little result.
I know most of you people won't help (in a way of giving the code) to
students, so that they won't learn anything from it.
But i've come so far (I think ) now, that im asking you please tell
what is wrong with following code:
// for Collections
import java.util.*;
public class Ballen extends JFrame {
// the array
private static int[] Ballenbak =
{
// even getallen
2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30, 32, 34, 36,
38, 40,
42, 44, 46, 48, 50
};
// shuffle integers
Collections.shuffle(Ballenbak);
}
The error I get is the following:
cannot find symbol; symbol : method shuffle(int[]), location: class
java.util.Collections
Can someone please tell me what I'm doing wrong?
Thanks in advance.