Hi everyone.... the first post
Btw, congratulations for indeed a great forum!!!
My question is regarding K&B book, specificly about "threads calling static synchronized method in the same class will always block each other", page 739.
So I prepare a little piece of program below with expectation my computer will start to levitate when those threads will fight for my bueatyfull static method. Here is the code:
Unfortunatelly, when executing this little program, my computer does not leviate nor even JVM freezes. Instead I have rather boring console output:
T1 prints: 1 2 3 4 5 T2 prints: 1 2 3 4 5
My question is: why? Do I misunderstand what "blocking "means?
Thanks in advance,
k