Results 1 to 2 of 2
Thread: RandomGenerator.getInstance()
- 11-27-2009, 05:04 AM #1
Member
- Join Date
- Nov 2009
- Posts
- 1
- Rep Power
- 0
RandomGenerator.getInstance()
I keep getting a error "cannot find symbol class: method getInstance()"..
What is going on? I spend almost an hour trying to clear this mistake, but I'm getting no where!
import acm.program.*;
import acm.util.RandomGenerator;
public class test extends ConsoleProgram{
public void run() {
RandomGenerator random = RandomGenerator.getInstance();
}
}
is my util package messed up??
- 11-27-2009, 06:32 AM #2
Moderator
- Join Date
- Feb 2009
- Location
- New Zealand
- Posts
- 4,540
- Rep Power
- 11
Make sure you don't have any other class called RandomGenerator in the same directory as test.class (and, please, rename that to Test.class).
acm.util.RandomGenerator is not a standard Java class, so anyone wanting to help would be assisted by a link to its API documentation.


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks