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 07:34 PM.
-- Android Development Center
-- Cloud Development Project Center
-- HTML5 Development Center
-- Windows Mobile Development Center