As I have said, I was under the wrong impression that those two classes share a common address space or at least ClassB can access and change the HashMap/Hashtable in ClassA which is reflected on ClassA as well(I was using Singleton for this). Then I tried static Hashtable which did not work and decided to give Singleton and RMI a try.
There seems to be no simple way of doing this(without rmi/sockets). Can I try persisting those objects(the ones I was thinking of putting in a hashtable) in a file(no db)?
But I read somewhere that one cannot append objects to a file..
Really confused. Kindly suggest me the best possible way out.