<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	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/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>CodeMocha &#187; java</title>
	<atom:link href="http://codemocha.com/tag/java/feed/" rel="self" type="application/rss+xml" />
	<link>http://codemocha.com</link>
	<description>Freshly ground code.  Thoughts on software and algorithms by Chet Mancini</description>
	<lastBuildDate>Fri, 18 Sep 2009 15:22:50 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Count Lines of Java Code Across Packages</title>
		<link>http://codemocha.com/2009/09/count-lines-of-java-code-across-packages/</link>
		<comments>http://codemocha.com/2009/09/count-lines-of-java-code-across-packages/#comments</comments>
		<pubDate>Fri, 18 Sep 2009 15:22:50 +0000</pubDate>
		<dc:creator>Chet</dc:creator>
				<category><![CDATA[Scripting]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[terminal]]></category>

		<guid isPermaLink="false">http://codemocha.com/?p=33</guid>
		<description><![CDATA[This little command will add up the lines of code across packages in a Java program.
1find . -name &#34;*.java&#34; -exec wc -l {} \+
]]></description>
			<content:encoded><![CDATA[<p>This little command will add up the lines of code across packages in a Java program.</p>
<div class="codecolorer-container text vibrant" style="overflow:auto;white-space:nowrap;width:600px"><table cellspacing="0" cellpadding="0"><tbody><tr><td class="line-numbers"><div>1<br /></div></td><td><div class="text codecolorer" style="font-family:Monaco,Lucida Console,monospace">find . -name &quot;*.java&quot; -exec wc -l {} \+</div></td></tr></tbody></table></div>
]]></content:encoded>
			<wfw:commentRss>http://codemocha.com/2009/09/count-lines-of-java-code-across-packages/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Circle Calculator</title>
		<link>http://codemocha.com/2009/07/circle-calculator/</link>
		<comments>http://codemocha.com/2009/07/circle-calculator/#comments</comments>
		<pubDate>Sat, 04 Jul 2009 03:26:57 +0000</pubDate>
		<dc:creator>Chet</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[calculator]]></category>
		<category><![CDATA[Code]]></category>
		<category><![CDATA[college]]></category>
		<category><![CDATA[java]]></category>

		<guid isPermaLink="false">http://codemocha.com/?p=3</guid>
		<description><![CDATA[For my first code post I thought it might be appropriate to put the first code from the first lab of my first computer science class at Wheaton.]]></description>
			<content:encoded><![CDATA[<p>For my first code post I thought it might be appropriate to put the first code from the first lab of my first computer science class at Wheaton.<span id="more-3"></span></p>
<div class="codecolorer-container java vibrant" style="overflow:auto;white-space:nowrap;width:600px"><table cellspacing="0" cellpadding="0"><tbody><tr><td class="line-numbers"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br />8<br />9<br />10<br />11<br />12<br />13<br />14<br />15<br />16<br />17<br />18<br /></div></td><td><div class="java codecolorer" style="font-family:Monaco,Lucida Console,monospace"><span class="kw1">import</span> <span class="co2">java.util.Scanner</span><span class="sy0">;</span><br />
<span class="kw1">public</span> <span class="kw1">class</span> Circle <span class="br0">&#123;</span><br />
&nbsp; &nbsp; &nbsp;<span class="kw1">public</span> <span class="kw1">static</span> <span class="kw4">void</span> main<span class="br0">&#40;</span><a href="http://www.google.com/search?hl=en&amp;q=allinurl%3Astring+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span class="kw3">String</span></a><span class="br0">&#91;</span><span class="br0">&#93;</span> args<span class="br0">&#41;</span> <span class="br0">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; Scanner keyboard <span class="sy0">=</span> <span class="kw1">new</span> Scanner<span class="br0">&#40;</span><a href="http://www.google.com/search?hl=en&amp;q=allinurl%3Asystem+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span class="kw3">System</span></a>.<span class="me1">in</span><span class="br0">&#41;</span><span class="sy0">;</span> &nbsp;<span class="co1">// input from keyboard</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <a href="http://www.google.com/search?hl=en&amp;q=allinurl%3Asystem+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span class="kw3">System</span></a>.<span class="me1">out</span>.<span class="me1">print</span><span class="br0">&#40;</span><span class="st0">&quot;Please enter the radius--&gt;&quot;</span><span class="br0">&#41;</span><span class="sy0">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="kw4">double</span> radius <span class="sy0">=</span> keyboard.<span class="me1">nextDouble</span><span class="br0">&#40;</span><span class="br0">&#41;</span><span class="sy0">;</span> &nbsp; <span class="co1">// radius to work with</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="kw4">double</span> diameter <span class="sy0">=</span> radius<span class="sy0">*</span><span class="nu0">2</span><span class="sy0">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <a href="http://www.google.com/search?hl=en&amp;q=allinurl%3Asystem+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span class="kw3">System</span></a>.<span class="me1">out</span>.<span class="me1">println</span><span class="br0">&#40;</span><span class="st0">&quot;The diameter is &quot;</span> <span class="sy0">+</span> diameter<span class="br0">&#41;</span><span class="sy0">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="kw4">double</span> circumference <span class="sy0">=</span> <a href="http://www.google.com/search?hl=en&amp;q=allinurl%3Amath+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span class="kw3">Math</span></a>.<span class="me1">PI</span><span class="sy0">*</span><span class="nu0">2</span><span class="sy0">*</span>radius<span class="sy0">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <a href="http://www.google.com/search?hl=en&amp;q=allinurl%3Asystem+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span class="kw3">System</span></a>.<span class="me1">out</span>.<span class="me1">println</span><span class="br0">&#40;</span><span class="st0">&quot;The circumference is &quot;</span> <span class="sy0">+</span> circumference<span class="br0">&#41;</span><span class="sy0">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="kw4">double</span> area <span class="sy0">=</span> <a href="http://www.google.com/search?hl=en&amp;q=allinurl%3Amath+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span class="kw3">Math</span></a>.<span class="me1">PI</span> <span class="sy0">*</span> <a href="http://www.google.com/search?hl=en&amp;q=allinurl%3Amath+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span class="kw3">Math</span></a>.<span class="me1">pow</span><span class="br0">&#40;</span>radius, <span class="nu0">2</span><span class="br0">&#41;</span><span class="sy0">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <a href="http://www.google.com/search?hl=en&amp;q=allinurl%3Asystem+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span class="kw3">System</span></a>.<span class="me1">out</span>.<span class="me1">println</span><span class="br0">&#40;</span><span class="st0">&quot;The area is &quot;</span> <span class="sy0">+</span> area<span class="br0">&#41;</span><span class="sy0">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="kw4">double</span> volume <span class="sy0">=</span> <span class="br0">&#40;</span><span class="nu0">4.0</span> <span class="sy0">/</span> <span class="nu0">3.0</span><span class="br0">&#41;</span> <span class="sy0">*</span> <a href="http://www.google.com/search?hl=en&amp;q=allinurl%3Amath+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span class="kw3">Math</span></a>.<span class="me1">PI</span> <span class="sy0">*</span> <a href="http://www.google.com/search?hl=en&amp;q=allinurl%3Amath+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span class="kw3">Math</span></a>.<span class="me1">pow</span><span class="br0">&#40;</span>radius, <span class="nu0">3</span><span class="br0">&#41;</span><span class="sy0">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <a href="http://www.google.com/search?hl=en&amp;q=allinurl%3Asystem+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span class="kw3">System</span></a>.<span class="me1">out</span>.<span class="me1">println</span><span class="br0">&#40;</span><span class="st0">&quot;The volume of a sphere is &quot;</span> <span class="sy0">+</span> volume<span class="br0">&#41;</span><span class="sy0">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="kw4">double</span> surfaceArea <span class="sy0">=</span> <a href="http://www.google.com/search?hl=en&amp;q=allinurl%3Amath+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span class="kw3">Math</span></a>.<span class="me1">PI</span> <span class="sy0">*</span> <span class="nu0">4</span> <span class="sy0">*</span> &nbsp;<a href="http://www.google.com/search?hl=en&amp;q=allinurl%3Amath+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span class="kw3">Math</span></a>.<span class="me1">pow</span><span class="br0">&#40;</span>radius, <span class="nu0">2</span><span class="br0">&#41;</span><span class="sy0">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <a href="http://www.google.com/search?hl=en&amp;q=allinurl%3Asystem+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span class="kw3">System</span></a>.<span class="me1">out</span>.<span class="me1">println</span><span class="br0">&#40;</span><span class="st0">&quot;The surface area of a sphere is &quot;</span> <span class="sy0">+</span> surfaceArea<span class="br0">&#41;</span><span class="sy0">;</span><br />
&nbsp; &nbsp; &nbsp;<span class="br0">&#125;</span><br />
<span class="br0">&#125;</span></div></td></tr></tbody></table></div>
]]></content:encoded>
			<wfw:commentRss>http://codemocha.com/2009/07/circle-calculator/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
