Help is needed


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 3 of 3

Thread: Help is needed

  1. #1
    Join Date
    May 2005
    Location
    Ontario, Canada
    Posts
    173

    Help is needed

    Hi all,
    I am facing trouble running this program:


    import java.util.*;

    public class E07_RandomInts {

    static Random r = new Random();
    public static void compareRand() {
    int a = r.nextInt();
    int b = r.nextInt();
    System.out.println("a = " + a + ", b = " + b);
    if(a < b)
    System.out.println("a < b");
    else if(a > b)
    System.out.println("a > b");
    else
    System.out.println("a = b");
    }
    public static void main(String[] args) {
    for(int i = 0; i < 25; i++)
    compareRand();
    }
    } ///:~

  2. #2
    Join Date
    Mar 2004
    Posts
    635
    what do you need help with? whats the problem? be more specific

  3. #3
    Join Date
    May 2005
    Location
    Ontario, Canada
    Posts
    173
    I was able to run javac without any error, but not java after that.
    Now, it is solved. I did not have the right Path for the java.util.*
    I thank you for your respond.
    Have a nice one.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center