I have a singleton class. one of his methods is:
public static void printMessage(boolean print, String text) {
if (print) {
System.out.print(text);
}
}
I have a multithreaded application, and more than one thread are using this method. I'm not sure, but do I need to add mutex to the implementation of printMessage ? I think that I dont need to, because I'm not using any class member. Am I right ?