What is the output?

In reply to Shashank Gurijala:

This task is declared inside module. so, it by default static.


//output
5	s=Thread: 2	a=8 
7	s=Thread: 2	a=16 

0ns → Thread 1 call to double : a = 5, s=Thread:1
2ns → Thread 2 call to double : a = 4, s=Thread:2
5ns → a = a * 2 = 4 *2 = 8 , display statement executed for Thread 1 call
7ns → a = a * 2 = 8 *2 = 16 , display statement executed for Thread 2 call


https://www.linkedin.com/in/rahulkumar-patel-04327a54/