Is it safe to store password in a static variable after it is read from properties file? I see that there are best practices regarding passwords should not be stored in strings (java), but I am unable to find people discussing about storing the password in static (string/char[]) variables through out the life of the application.
Will storing password in static variables cause an additional threat of the password being exposed to the external world? Should the password variable be disposed after connection to an external system is created?