String array refuses to accept passed element through a method
i have a method:
public void updateUsers(String connectedUsers)
which takes a string array as the parameter. What i'm trying to do is through another class i'm trying to access the method client.updateUsers(client.name); name is a string variable i'm trying to pass that through the updateUsers method so that it updates the list whenever a new client is created with the clients name (string).
I keep getting a compilation error saying that updateUsers(java.lang.String) in Client cannot be applied to (java.lang.String).
Here's the exact line i tried:
Also in the class that i'm trying to access the method (server) which is in client i tried
String sa = new String;
sa = "test";
and it works?
I don't understand why it's not accepting a string. I tried client.updateUsers() i get a compilation error saying that it can't be applied to ()
Last edited by Emus; 03-26-2005 at 08:34 PM.
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