-
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();
}
} ///:~
-
what do you need help with? whats the problem? be more specific
-
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
Forum Rules
|
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL
|
Bookmarks