I understand that static method does not guarantee thread safety. Because even though there is a single class method in the entire application, that method can be called simultaneously and could cause thread safety issues if you are not careful. But what happens when that class method doesn't affect any global variable? Is is still Thread Safe? For example, I have this code:
public static String convertToString(int i) {
return String.valueOf(i);
}
If 2 or more threads were to call this method simultaneously, is it thread safe?