Results 1 to 2 of 2
  1. #1
    dlevanchuk is offline Member
    Join Date
    Nov 2009
    Posts
    1
    Rep Power
    0

    Default 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??

  2. #2
    pbrockway2 is offline Moderator
    Join Date
    Feb 2009
    Location
    New Zealand
    Posts
    4,574
    Rep Power
    12

    Default

    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.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •