Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 11-27-2009, 06:04 AM
Member
 
Join Date: Nov 2009
Posts: 1
Rep Power: 0
dlevanchuk is on a distinguished road
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??
Bookmark Post in Technorati
Reply With Quote
  #2 (permalink)  
Old 11-27-2009, 07:32 AM
Senior Member
 
Join Date: Feb 2009
Posts: 589
Rep Power: 1
pbrockway2 is on a distinguished road
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.
Bookmark Post in Technorati
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +2. The time now is 12:27 AM.



VBulletin, Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2009, Crawlability, Inc.
Copyright ©2006 - 2007, www.java-forums.org