mardi 11 septembre 2018

Singleton with 3 variables instead of 3 global variables?

I´m writing a multi-thread program in java. Right now I have three global variables that different threads can modified. The program works BUT I now that global variables are bad practice.

It is safer doing a singleton class with three variables?

Aucun commentaire:

Enregistrer un commentaire