<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Using synchronized methods in java</title>
	<atom:link href="http://www.parolski.com/2008/10/04/using-synchronized-methods-in-java/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.parolski.com/2008/10/04/using-synchronized-methods-in-java/</link>
	<description>Faith, Solaris, and Chicken Korma, by Anton Parol</description>
	<lastBuildDate>Mon, 20 Jun 2011 20:37:35 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3</generator>
	<item>
		<title>By: Anton Parol</title>
		<link>http://www.parolski.com/2008/10/04/using-synchronized-methods-in-java/comment-page-1/#comment-309</link>
		<dc:creator>Anton Parol</dc:creator>
		<pubDate>Sun, 05 Oct 2008 15:23:02 +0000</pubDate>
		<guid isPermaLink="false">http://www.parolski.com/?p=116#comment-309</guid>
		<description>Thats very helpful Liam! Thanks!
The following changes were made:

1. Made all classes begin with a capital letter. Like you say, nowits obvious whats a field and whats a class!
2. Changed the constructors for the threads, they now look like:
    public OpenLockThread(Padlock padlock) {
        this.padlock = padlock;
    }
There was a small issue with casting still, because I was saying:
    public OpenLockThread(Object padlock) {
        this.padlock = padlock;
    }
But once I told it it should expect a Padlock and not an object, no casting was needed! :)
3. That boolean field was changed, and it makes the code nice and easy to read.
I have to say, I really enjoy when code reads like normal English prose, its so much easier to understand!!!</description>
		<content:encoded><![CDATA[<p>Thats very helpful Liam! Thanks!<br />
The following changes were made:</p>
<p>1. Made all classes begin with a capital letter. Like you say, nowits obvious whats a field and whats a class!<br />
2. Changed the constructors for the threads, they now look like:<br />
    public OpenLockThread(Padlock padlock) {<br />
        this.padlock = padlock;<br />
    }<br />
There was a small issue with casting still, because I was saying:<br />
    public OpenLockThread(Object padlock) {<br />
        this.padlock = padlock;<br />
    }<br />
But once I told it it should expect a Padlock and not an object, no casting was needed! <img src='http://www.parolski.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /><br />
3. That boolean field was changed, and it makes the code nice and easy to read.<br />
I have to say, I really enjoy when code reads like normal English prose, its so much easier to understand!!!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Lamsey</title>
		<link>http://www.parolski.com/2008/10/04/using-synchronized-methods-in-java/comment-page-1/#comment-308</link>
		<dc:creator>Lamsey</dc:creator>
		<pubDate>Sun, 05 Oct 2008 07:19:06 +0000</pubDate>
		<guid isPermaLink="false">http://www.parolski.com/?p=116#comment-308</guid>
		<description>Class names should start with a capital letter, thus differentiating them from variables/fields, which start with small letters. This should fix the problem you have with:

this.padlock = (padlock) padlock;

The above is confusing because &#039;padlock&#039; could refer to the class or the variable.

Generally, boolean field names should be a statement, like &#039;padlockIsOpen&#039;. This is so they make sense when you use them in an if statement:

if (padlockIsOpen) { stealBike(); }

HTH!</description>
		<content:encoded><![CDATA[<p>Class names should start with a capital letter, thus differentiating them from variables/fields, which start with small letters. This should fix the problem you have with:</p>
<p>this.padlock = (padlock) padlock;</p>
<p>The above is confusing because &#8216;padlock&#8217; could refer to the class or the variable.</p>
<p>Generally, boolean field names should be a statement, like &#8216;padlockIsOpen&#8217;. This is so they make sense when you use them in an if statement:</p>
<p>if (padlockIsOpen) { stealBike(); }</p>
<p>HTH!</p>
]]></content:encoded>
	</item>
</channel>
</rss>

