|
Output:running...
Output:1 2 3 4 5 1 2 3 4 5
As you can see in the above program that there is no context-switching because here t1 and t2 will be treated as normal object not thread object. |
I am a CSE Student pursuing B.Tech from GNDEC,Ludhiana. I am a Web Developer & Android Apps Developer. My blog can help you to learn about JAVA, ANDROID , Other Technologies, and Important Technical and Non-Technical Interview Questions and Programs.
|
Output:running...
Output:1 2 3 4 5 1 2 3 4 5
As you can see in the above program that there is no context-switching because here t1 and t2 will be treated as normal object not thread object. |
No comments:
Post a Comment