Is having Java static final String (constants) will save heap space?
Analyzing java heap dump of 1G showing up duplicate strings cost around 300M+ which means a lot for a app using max of 1G heap...
why there are duplicate Strings?-- few Tables have createdUser and modifiedUser columns, mostly these values refer to 20 usersnames all DBobjects holds this values as strings which in return causes duplicate values.... thinking to create 20 names as constants and refer them this constants at time of object creation? not sure how this idea works or best practices, looking for better solution and knowledge to deal