With respect to this question, I have a sub question
Are non-synchronised static methods thread safe if they don't modify static class variables?
If I have this method defined in a Singleton class
public static Date getDateDiff(Date a, Date b){ return a-b; } If two threads simultaneously concurrently call this method and pass different a,b then will they get correct results?
My understanding is they should get since each is passing different date object which is not accessible to the other ...
Under which condition will they get wrong results due to overwriting of the Date objects?