class Writer{
static int a;
static int b;
public static void write(String inFile, String outFile){
...
}
}
Now I use this class this way:
Writer.write(f1, f2)
This line of code will be accessed by multiple threads. I feel I still need to protect the 'write()' method with the keyword "synchronized". But my question is, since Writer class only has static variables and static methods, the client code doesn't need to create any instance out of it. Do I still need to synchronize the write method?