-
import Random class
Hi
......
Random select = new Random();
for(int i =0;i<5;i++)
{
petChoice = thePets[select.nextInt(thePets.length)];
System.out.println("\nYour choice:\n" + petChoice);
petChoice.sound();
}
.................
This part of coding gives the erroe as follows:
C:\Data\Mukti\Java\TestDerived\TestInterface.java:19: Wrong number of arguments
in method.
petChoice = thePets[select.nextInt(thePets.length)];
I am not able to figure out.Can someone help.
Thanks in advance.
Mukti
^
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