Originally posted by Abdullah Al Mamun:
Since i is a class variable
That i is static is unimportant. The important thing is, that all threads use the same object for synchronization.
at most one class lock is possible
It is possible, however it's not used in the original posting.
So all the five threads cannot execute i++ at the same time.
Conclusion: In the original posting, all five threads can execute i++ at the same time.