<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-3259003521528371225</id><updated>2011-04-21T18:14:12.864-07:00</updated><title type='text'>Java Burger</title><subtitle type='html'></subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://javaburger.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3259003521528371225/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://javaburger.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Sachin</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='http://4.bp.blogspot.com/_hpoWLUUuwbc/SePLc4ETZMI/AAAAAAAAAZY/OrHQKzKKK9o/S220/pokemon_trainer_070813a-l.jpg'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>2</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-3259003521528371225.post-4679500168272651427</id><published>2008-10-06T19:46:00.001-07:00</published><updated>2008-10-06T19:46:28.134-07:00</updated><title type='text'>Solution</title><content type='html'>Looks like you are having problem understanding the core fundamental of synchronization. You should start writing code for testing all these scenarios.&lt;br /&gt;&lt;br /&gt;To answer your question.&lt;br /&gt;&lt;br /&gt;Yes, a Non synchronized method can always be called without any problem. In fact Java does not do any check for a non-synchronized method. The Lock object check is performed only for synchronized methods/blocks. In case the method is not declared synchronized Jave will call even if you are playing with shared data. So you have to be careful while doing such thing. The decision of declaring a method as synchronized has to be based on critical section access. If your method does not access a critical section (shared resource or data structure) it need not be declared synchronized.&lt;br /&gt;&lt;br /&gt;See the Example Code which demonstrate the same.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3259003521528371225-4679500168272651427?l=javaburger.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://javaburger.blogspot.com/feeds/4679500168272651427/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3259003521528371225&amp;postID=4679500168272651427' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3259003521528371225/posts/default/4679500168272651427'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3259003521528371225/posts/default/4679500168272651427'/><link rel='alternate' type='text/html' href='http://javaburger.blogspot.com/2008/10/solution.html' title='Solution'/><author><name>Sachin</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='http://4.bp.blogspot.com/_hpoWLUUuwbc/SePLc4ETZMI/AAAAAAAAAZY/OrHQKzKKK9o/S220/pokemon_trainer_070813a-l.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3259003521528371225.post-8720755124077229734</id><published>2008-10-06T19:45:00.001-07:00</published><updated>2008-10-06T19:45:59.317-07:00</updated><title type='text'>Can a thread call a non-synchronized instance method of an Object when a synchronized</title><content type='html'>Can a thread call a non-synchronized instance method of an Object when a synchronized method is being executed ?&lt;br /&gt;&lt;br /&gt;I am having difficulty understanding this synchronization stuff.&lt;br /&gt;&lt;br /&gt;Assume if a Class has two methods&lt;br /&gt;- method1 is synchronized instance method&lt;br /&gt;- method2 is a regualr instance method&lt;br /&gt;&lt;br /&gt;So in this scenario, can there be two threads calling these two methods in parallel for the same instance?&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3259003521528371225-8720755124077229734?l=javaburger.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://javaburger.blogspot.com/feeds/8720755124077229734/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3259003521528371225&amp;postID=8720755124077229734' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3259003521528371225/posts/default/8720755124077229734'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3259003521528371225/posts/default/8720755124077229734'/><link rel='alternate' type='text/html' href='http://javaburger.blogspot.com/2008/10/can-thread-call-non-synchronized.html' title='Can a thread call a non-synchronized instance method of an Object when a synchronized'/><author><name>Sachin</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='http://4.bp.blogspot.com/_hpoWLUUuwbc/SePLc4ETZMI/AAAAAAAAAZY/OrHQKzKKK9o/S220/pokemon_trainer_070813a-l.jpg'/></author><thr:total>0</thr:total></entry></feed>
