|
||||||
| Java Help Java Help forum discussing all Java platforms - J2ME, J2SE and J2EE - as well as relevant standards, APIs and frameworks such as Swing, Servlets, JSPs, Applets, Struts, Spring, Hibernate, ANT, EJB, and other Java-related topics. |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
|
|||
|
Hi,
I'm new to programming and am using BlueJ. I'm trying to generate n random points with [x,y] co-ords each in the range (0,1). double[] location = new double [n]; for (i=0;i<n;i++){ location[i]=Math.random(); is what i was thinking however this does not work since i is not defined properly. I'm a little confused, any help would be appreciated. Thanks |
| Sponsored Links |
|
|
![]() |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | Search this Thread |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Generating Random Numbers with PHP | Paradine | PHP Tutorials | 4 | 08-27-2007 08:09 PM |
| Return random numbers without duplicates | Paradine | PHP Tutorials | 0 | 08-26-2007 03:07 PM |
| Code:PHP Random Functions | John | PHP Tutorials | 2 | 12-03-2006 11:04 AM |
| Store and Points System | Jordan | Announcements | 9 | 08-28-2006 02:38 PM |
| I need to generate a random number in PHP | dirkfirst | PHP Forum | 7 | 07-05-2006 10:58 PM |
| WingedPanther | ........ | 2753.6 |
| Xav | ........ | 2704 |
| Brandon W | ........ | 1702.32 |
| John | ........ | 1207.73 |
| marwex89 | ........ | 1175.24 |
| morefood2001 | ........ | 966.05 |
| dcs | ........ | 655.75 |
| Steve.L | ........ | 475.59 |
| orjan | ........ | 418.58 |
| Aereshaa | ........ | 383.54 |