private member of a class does not retain the values during a later call from another class. Instead shows initialized value or a random value. How to make sure that the mem