I am wondering whether the static method java.lang.Math.max(int a, int b) is thread safe?
If it is not thread safe, could you explain the situation where this method gives wrong output due to concurrent access of to multiple threads, with a piece of code?
You only get thread safety issues from concurrent access of shared state where at least one thread modifies the state.
Math.max(a, b)doesn’t have any state, shared or otherwise so its thread safe.