tag:blogger.com,1999:blog-8712770457197348465.post8256063998367702287..comments2024-03-28T02:47:19.159-07:00Comments on Javarevisited: What happens when you call Thread.run() instead of Thread.start() in Java? Trick Interview Question javin paulhttp://www.blogger.com/profile/15028902221295732276noreply@blogger.comBlogger13125tag:blogger.com,1999:blog-8712770457197348465.post-6661997864369389202021-02-04T20:44:46.548-08:002021-02-04T20:44:46.548-08:00Thx Unknown, glad you find this multithreading art...Thx Unknown, glad you find this multithreading article helpful. javin paulhttps://www.blogger.com/profile/15028902221295732276noreply@blogger.comtag:blogger.com,1999:blog-8712770457197348465.post-9919181076709856292021-02-03T10:27:56.963-08:002021-02-03T10:27:56.963-08:00That's really a nice work. Thanks...That's really a nice work. Thanks...Anonymoushttps://www.blogger.com/profile/16947251285647232730noreply@blogger.comtag:blogger.com,1999:blog-8712770457197348465.post-59970529160838009672021-02-03T10:27:04.906-08:002021-02-03T10:27:04.906-08:00Your explanation is awesome and so easy to underst...Your explanation is awesome and so easy to understand. Thanks ...<br />Anonymoushttps://www.blogger.com/profile/16947251285647232730noreply@blogger.comtag:blogger.com,1999:blog-8712770457197348465.post-17489340855901443742014-10-08T10:49:50.197-07:002014-10-08T10:49:50.197-07:00Hello Javin,
Its unfortunate for me that I came t...Hello Javin,<br /><br />Its unfortunate for me that I came to know about your blogspot yesterday only. Your explanation is simple and descent to understand for naive developers like me.<br /><br />Thanks a ton. Suyashnoreply@blogger.comtag:blogger.com,1999:blog-8712770457197348465.post-70691204575798217342014-09-24T06:23:55.559-07:002014-09-24T06:23:55.559-07:00@Jitendra, I agree with you, especially if you are...@Jitendra, I agree with you, especially if you are sharing object, consider making them Immutable which are inherently thread-safe or employ synchronization, thread local variable to make it thread-safe.javin paulhttps://www.blogger.com/profile/15028902221295732276noreply@blogger.comtag:blogger.com,1999:blog-8712770457197348465.post-29208528469802870982014-09-24T06:22:42.949-07:002014-09-24T06:22:42.949-07:00I remember you Srinath, welcome back :) Glad this ...I remember you Srinath, welcome back :) Glad this article help you to understand multi-threading in Java better. javin paulhttps://www.blogger.com/profile/15028902221295732276noreply@blogger.comtag:blogger.com,1999:blog-8712770457197348465.post-11256418325233228642014-09-23T23:21:16.589-07:002014-09-23T23:21:16.589-07:00Hello paul,
I am regular visitor of java revisited...Hello paul,<br />I am regular visitor of java revisited from past 3 years. I really love each and every article you share here. This article cleared some of my doubts regarding multi threaded programming in java. <br /><br />Thank you,<br /><br />Regards:<br />Srinath Reddy.srinath reddyhttp://www.codedebugging.comnoreply@blogger.comtag:blogger.com,1999:blog-8712770457197348465.post-83591513940972093872014-09-23T11:29:10.773-07:002014-09-23T11:29:10.773-07:00Very good explantion...thanks. In mutlithread prog...Very good explantion...thanks. In mutlithread programming we should also think for 'thread-safe' code whenever it is required.Jitendrahttps://www.blogger.com/profile/09525094766919421585noreply@blogger.comtag:blogger.com,1999:blog-8712770457197348465.post-63907751993678132252014-09-23T08:50:29.746-07:002014-09-23T08:50:29.746-07:00@Kaushik, you made an interesting point. I have se...@Kaushik, you made an interesting point. I have seen lots of subtle threading bugs involving static variables. javin paulhttps://www.blogger.com/profile/15028902221295732276noreply@blogger.comtag:blogger.com,1999:blog-8712770457197348465.post-19672966044923335602014-09-23T08:48:51.654-07:002014-09-23T08:48:51.654-07:00Hello Muralidhar, Thanks for you comments. Indeed ...Hello Muralidhar, Thanks for you comments. Indeed Synchronizing HashMap is not a good idea in world of ConcurrentHashMap, You may want to check my post about CHM <a href="http://javarevisited.blogspot.sg/2013/02/concurrenthashmap-in-java-example-tutorial-working.html" rel="nofollow">here</a>javin paulhttps://www.blogger.com/profile/15028902221295732276noreply@blogger.comtag:blogger.com,1999:blog-8712770457197348465.post-27438567758715947192014-09-23T00:02:55.766-07:002014-09-23T00:02:55.766-07:00Hi Javin , i have subscribed your posts through em...Hi Javin , i have subscribed your posts through email. I like this post very simple and concise. I just trying to synchronizing HashMap. Can you provide some link to understand it..<br />one more thing...Now your blog looks good with this font size. <br />Thank you.Muralidharhttp://javabynataraj.blogspot.comnoreply@blogger.comtag:blogger.com,1999:blog-8712770457197348465.post-54308775693682116042014-09-22T23:37:31.204-07:002014-09-22T23:37:31.204-07:00Yes, you explained it correctly but one thing you ...Yes, you explained it correctly but one thing you forget to share is that t is a thread class object and its having by default threadness feature but in first scenario thread t didn't execute run method just because thread t was in runnable state not in running state of thread life cycle, Once thread t execute t.start method then only it went to running state of life cycle.Punit Mankarhttps://www.blogger.com/profile/02128184997930505204noreply@blogger.comtag:blogger.com,1999:blog-8712770457197348465.post-1479279565178219152014-09-22T11:11:51.577-07:002014-09-22T11:11:51.577-07:00Another common mistake is during synchroniazation ...Another common mistake is during synchroniazation of static variable, instead of class level lock, we use object level lock using this variable in synchronized blockKaushik Patelhttps://www.blogger.com/profile/12944419025061305882noreply@blogger.com