|
-
random numbers
Here is my code. This should print out a random number, but it instead gives
me a loverly exception:
"exception in thread "main" java.lang.NoClassDefFoundError: Merge/Java"
Please help!!
import java.io.*;
import java.util.Random;
class Merge {
public static void main(String[] arg) {
Random r = new Random();
for (int i=0; i<10; i++) {
System.out.println(50+r.nextInt()%50);
}
System.out.println("Done.");
}
}
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