can someone tell me why thread execute concurrently
the numbers will be same on same line(i=1,j=1)
What I thought was because the run method is synchronized one thread must complete its run method before another thread begins.
sample output:
Thread-0 i 1,j 1
Thread-0 i 2,j 2
Thread-0 i 3,j 3
Thread-0 i 4,j 4
Thread-0 i 5,j 5
Thread-0 i 6,j 6
Thread-0 i 7,j 7
Thread-0 i 8,j 8
Thread-1 i 1,j 1
Thread-1 i 2,j 2
Thread-1 i 3,j 3
Thread-1 i 4,j 4
Thread-1 i 5,j 5
Thread-1 i 6,j 6
Thread-1 i 7,j 7
Thread-1 i 8,j 8
Thread-1 i 9,j 9
Thread-1 i 10,j 10
Thread-1 i 11,j 11
Thread-1 i 12,j 12
Thread-0 i 9,j 9
Thread-0 i 10,j 10
Thread-0 i 11,j 11
Thread-0 i 12,j 12
[ May 15, 2007: Message edited by: shyam kumarK ]