I am designing a chat server and to keep track of the user that are logged on. I am using a class which has static method and a static Vector. But when I pass the argument from other program this static Vector gives an error... "java.lang.NullPointer" or if I initialise the vector then I lose the traack of the users as everytime it stores in a new instance of the Vector. So if anyone has any idea...I would look forward to get some help thanks Pratik Khetia
Well, you have to initialize the vector once. So how about putting something like this before accessing a vector if (static_vector == null) static_vector = new Vector(); ... continue using vector